Streams refactor