Refactored internal meta data to be less string-dependent in actual use.

Still not 100% happy, but at least now code referencing templates settings do so by a compiler-verifiable symbol look-up rather than a string.