Hooks

Implemented system hooks. Fixes #6.

**Latest changes must be tested before merging.**
...I'll do it when I get home to my Mac (stupid Windows school computer) :wink: