Added prune method.