Added updateEnvironment function
Merge origin/dev into dev