I cleaned-up kdist, pdist, and e_scale.