Move hook to relevant file