Initial implementation of environments and continued implementation of modes.
Merge pull request #36 from amcgowanca/7.x-1.x

Environments and modes