Refactored the distance related stuff.
Americanize the code.