OO-ify and bugfix text
add module exports
make buffer a text instead of a string