clean up dstream.py