Revert grains enviorn.

This has massively broken the develop branch. Reverting.
Merge pull request #10985 from cachedout/core_environ_revert

Revert grains enviorn.