Properly attribute the delayed substitutions
Some other minor changes