Re-implemented data with id, id_parent indices. (WORKING). Still needs some cleanup and file i/o to be fully functional.