Global and module hooks

Won't fix #69 anymore
Fixes #70