Move reg/unreg hooks to a more approp location