Removed unecessary variable.
Replaced deprecated use of crypto:md5_mac/2 with crypto:hmac/3.