enhanced comments on buffer.c