extract parse-stream into its own module