some reorganization. trying to control the GUI from controller.hs