Edit main template