Added documentation comments to buffer.c