Fixed bug that caused templates to be missing.

Some decent style upgrades.