add environments
update example and README
improve var names
Merge branch 'support-environments'