Refactored to use the callback-stream package.