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.