Built a recursive template loader