Added method addEventsToGui()

the interesting part of the changes is on line 347 and downward in the
GUI class.. for some reason git decided I've added and deleted spaces
almost everywhere..