worked towards resource management, seperated out "rootObject"  from treeObject