Refactor DefaultServiceManager into command mode.