added test for nearest point within a certain range
small changes, added another kdtree test
have a basically working inverse, using KDTree only