rename Stream to StreamService
refactor StreamService and add relevant tests