First build with separated modules

A major rewrite on hooking functions.
Haven't link against it yet.