Improvements in the buffer implementation.