Fix bugs. Add Tree.