Extended hook system. Still very unstable, not documented, only partially tested