This change moves several repeated sections of code that was searching for templates and valid template locations to a new class. It adds unit tests for the new class and verifies subsystem support for templates.