Upgraded Environment to a class.