Clean up the environment dictionary when finished.