Move environment scripts into from the view into /js