Main File Generates KDTree datastructure