clean up and get_stream() support