Comments added for distance calculations.