Cleaning up a bit and adding some comments/stuff to DistanceStudy