refactor Locations

took the distance calculation out and make it a static method.