Updated parsing method and added words array to treenode structure
Merge conflict resolved