Put GUI event handling in Gui class.