Fixed sorting bug introduced in previous commit. Progress on tree structure, including population of a data structure (model.level_index_list) containing the recursive results of applying iders and getters, verified to be correct by printf-debugging.