Remove unnecessary substitutions