Add ability to reset a buffer and fix emit preamble.