Updated main template