Prototype of kdtree. Very Work in Progress.