Clean up substitutions into effects