Added getTreeFromNewick function to construct a tree structure from a newick representation