Added comments to tree.py