calculate distance consistently with round
support miles and km in distance
Updated docs, minor bugfixes