Merge pull request #8 from murrekatt/develop

Even more refactorings and cleanups.
Moved out notary functionality to own class.