* hook_inst.c refactoring