Added hooks.
Merge pull request #1 from kotnik/pr/hooks

Added hooks.