Added a class template for TreeNodeIterator.