respond to feedback from pull request

Justify commented code with other comments to explain what's going on
and few hints on how to get info.

Also move hashing function to it's own dedicated function in utils,
and update tests to expect a hashed value.