Move RegistrationManager to a separate file.