Merge pull request #179 from evoskuil/version2

Message signing functional and tested, refactoring.