calculations and distance matrix refactored
Merge remote-tracking branch 'origin/master'