Cleanup in streams.py