Unstructured kdtree

This PR fixes #31.