converted content_stream module into lib class.