clean up the create-scratch-buffer function