Hooking

Pulling the function hooking changes into the master branch.

Only 2 commits though, meh.