Split out global_measures as a package
Adde distance to port in addmeasures