update primary template and related styles