Refactor implementation of DefaultServiceManager.