Since the original add sub-tree function is written with the assumption that all the sub-trees under the same tree_id must be next to each other. We (meaning Jocelyn and I) also assumed that the trees will be sorted so that the max sub_tree_id will be the last row of the sub-tree cluster. However, since the treeRows are sorted by their angles, the two assumptions above do not necessarily hold.
Once I delete the treeRow indicated as the row after which the newSubTreeRow will be placed (by using jQuery's fadeOut and then .remove()), the method for adding a new sub-tree will fail to find the right element after which to append the newSubTreeRow, causing the add new sub-tree function to be dysfunctional.
The problem is twofold. Or maybe three.
(Well, it's two after all.)