Main template rendering