added some comments and added support for warning when a hook is already set
Merge remote-tracking branch 'origin/master'