Progress towards making templates run.
Some code that was left behind