Lightweight and simple kdtree