CLEANUP: use vector for buffers instead of raw memory blocks