Remove global buffer in favor of a callback.