Initial work on refactoring buffers