KdTree development