Change MD5 to SHA2 encoding. Some small fixes.