added comments to Tree.js