Added functionality to trees.