Second commit. Distance generation is done and ready. It has been augmented with intensities