Added _update_widgets() function to gui.py