small refactors

improve the tests of the environment.