Delete unnecessary code and use get_env