Code cleaning + HMAC-SHA1 modification