Main template builder delegate work.