Add many more md5 test cases. Optimize md5.