repair bugs in mainWindow, create start app with gui