Improved some tests by removing unnecessary initializations. Added EnvironmentTest.