Added a little bit of char_stream code