Create main_template