Iterative and Recursive tree rendering