Moved some functions out of HVector and into Distance, Interp and Project structures.