Remove unnecessary temporary buffers