Keep deltas only for the two latest versions
Flush python output
Remove unused code