active_tab reference is now properly updated
adding tab_switch_cleanup method to GUI object