Updated main_ui.py