move streams to their own JS file