Also forgot to prototype the distance function.