Clean up the environment variable handling.