Refactoring ServiceClient and its implementation