Update main_template