Cleanup
Regenerate the tree on node change, remember which nodes are expanded when redrawing the tree