Generalize binding management.
Much more principled use of PreTransforms.
Merge pull request #852 from sjrd/refactor-optimizer

Refactor the optimizer