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

Added hooks.