Add text buffer class