Refactoring needs hooks