Possible solution for #1, #3. Added global storage for buffers data