Merge the pruning code.