Creation of a Tree and recursive traversals