Some fixes.
Deleting old code.
Fixes to block substitution builder.