Switch to a more efficient string buffer implementation