MD5 digest compatibility tests, small fixes and refactoring
Merge pull request #1 from honza889/digest-md5

MD5 digest compatibility tests, small fixes and refactoring