Cleanup and reorder hooks.