change bracket notation to pointer arithmetic, for consistency
remove unneeded function buffer_reset
remove obsolete comment