Updated the way the environment is created