refactoring
Templates and registration
Templates and registration