restructure core extension
implement Module::hook