Added comments and fixed up the signature calculation to include the timestamp as well to prevent replay attacks.