Extract out until stream into its own module