Some minor fixes
Clears pairs and environments when adding