Added register class with tests.