Move hooks to separated file.