Adding iterative traversals for trees.