Refactoring the gui.main ns.