Move the register method to it's own class.