Hooks moved to a separate file