Add functions to manipulate substitutions and rename similar functions manipulating class environments