Fixed bug with maxDistance setting, removed testing line from maxdistance-example.html