Fix up templates a bit