Commented code, changed to MD5 for key generation