Revamped buffering (rev. 7_b3)

Signed-off-by: nixnodes <code@eth.si>