Recursive and Iterative tree rendering