Simplify stream handling.