Re-wrote IndexTree to only allocate memory for non-null extreme nodes.