TemplateResolver separated from TemplateGuesser

To be able to use it in apps too