Some code simplifications
Fixed a few bugs
Fix const-correctness of md5_compress