GUI now handles resizing of the window