more resource-manager refactoring