Update hooking system

Fixes #28