Remove polymorphism from output_buffer to mirror input_buffer.
No need to typedef structs in C++.
Using namespace considered ugly in headers, even within namespaces.

Also drops using within .cpp files since it didn't add enough value.