cleaned up spagedi_tree.py a little bit