Added the env switch functions.