Implemented the Substitution Optimization. It is applied by default when using execScriptM.