Reorganization of the tree