Stream classes refactor