adapted script to work with environments
cleaned with angular
Merge pull request #1 from worldspawn/feature/environments

Feature/environments