Renamed keyDialog to mainDialog, removed main window class.