Start supporting doctype argument. 7 tests failing,

most related to template loading.