Prepare for substitutions.