Refactoring Service Gateway