Refactored and documented streamy