STREAMS-190 | Refactored to remove repeated code
Merge PR#99 'rbnks/STREAMS-190'