md5 ajax refactored