Refactoring PeerDiscoveryConfig into a more general Config service.