Update tree structure.