Integrated ServiceDiscovery with ServiceContext. Needs tidying up.