Cleaning up some buffer handling