Move hooks to the end of the file