Move registering and unregistering of Otto to base files