Code reorg in interface.gtk.window.main