rename buffer to strbuf, fixup buffer_init