Refactor stream handlers into 'streaming' NPM package.