Refactored streaming
Refactored .toBuffer() method