remove getTemplateFor(type) method as it is unnecessarily complicated