Clean up Buffer implementation and add integration tests for buffers.