Fixed the add new subtree function. Now it will find the last row in the table in whatever order the table is. However, I'm not sure what will happen if the user sorts the table while trying to add a new row.