Refactor Registry to use Dependency Injection. Provide a Factory to ease the transition.