Subtree pruning and regrafting