Split out tests into multiple files
Refactor out many of the streaming calls into its own npm module.