Move hooks to controller