split read and write buffers in buffer module (problematic for read/write buffers, e.g. for sockets); automatically flushing the write buffer when reading now