Refactored the registration class
Some more refactoring