Cleaned up and prettified substitution section.