Modified kdtree and Node classes