Major improvements to distance calculations, now universal dist is over twice as fast.