Improve streams

I'm not a big fan of the side-effecting statement on the same line as `if`.