Refactor using service manager