First pass at the kdtree