Improvements to snapshot trimming.