class registry refactoring