Refactoring RegistryService