Pruning Trees and Shrubs