move ServiceManager to external module