refactor RegistryLoader