Set this to a const char*
Fix these typedefs
Add a delete function for the text_buffer
Fix some warnings

Visual C++ complained about unnamed structs when used in a C++ file.