Cleanup in the Hooks code.