Sorting User Provided Environment Variables

- Turns out JSON returned from API is preformatted, don't need to split
  on the new lines here.
- Also minor refactor for cleanliness.
Merge pull request #227 from XenoPhex/master

By Grabthar's hammer, by the sons of Worvan, you shall be avenged. Also, sorting.