Refactoring of registration