Improve buffering and maybe performance on DataStream
The current DataStream implementation isn't optimized at all. That's well and good for now, but eventually we should refactor it to have better performance, possibly buffer more data, but buffer no more than needed, etc.