Added ability to enable and disable hooks