Added additional registration tests, refactoring