First pass at the register method with tests.