Refactoring stream outputs