small cleanups regarding use of buffer functions