Added in logic to select templates based on primaryType, broke a bunch of tests, oh, well, it's Friday