Renamed constants.h to common.h and extracted generic hooking code into common.c