Another cleanup refactoring magic registration