Split out template loading