Switched buffer management over to dymamic memory allocation with std::vector