Change string constants to class constants and add more test cases in environment.py