Rework internal buffers handling to be extensible