Clean up scratch buffer