Added a text buffer class