improved javadoc in "distance" and "exceptions" packages