Update the environment.