registry refactor