Refactoring the ServiceDiscoveryClient.