Rewrite some more of the language used in documentation.
Use the variables directly in the distance function.