Change from setting children of TreeItem to setting the parent