CoTraining: More additions
KdTree: Fix bug in get_nodes_to_subdivide_depth(), add some debugging code