Just to confirm the proposed change, Iterator<Pair<String,Service>> to Map<String, Service>? If that's correct then sounds good.