[minor] Adding some comments, updating tests
[minor] Adding a pre-commit hook