Changed the distance function name to something actually suitable.