Abstracted out distance methods into mapped objects that will calculate
the distance.