private Main() {
		main = this;

		userPreferences = new UserPreferences();
		soundManager = new SoundManager();
		logFileWriter = new LogFileWriter();
		networkConnection = new NetworkConnection();
		review = new Review();
		fontManager = new FontManager();

		SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				mainFrame = new MainFrame();
				synchronized (Main.getMain()) {
					Main.getMain().notifyAll();
				}
			}
		});

		synchronized (Main.getMain()) {
			while (mainFrame == null) {
				try {
					Main.getMain().wait();
				} catch (InterruptedException e) {
					Util.printStackTrace(e);
				}
			}
		}

		// main loop!
		for (;;) {
			setMode(MODE_CHOOSE_MODE);
			mainFrame.setTitle(getProgramName());
			selectedMode = SELECTED_MODE_NOTHING_YET;
			new ModeDialog();
			synchronized (this) {
				while (selectedMode == SELECTED_MODE_NOTHING_YET) {
					try {
						wait();
					} catch (InterruptedException e) {
						Util.printStackTrace(e);
					}
				}
			}

			switch (selectedMode) {
				case SELECTED_MODE_PLAY:
					playMode();
					break;
				case SELECTED_MODE_REVIEW:
					reviewMode();
					break;
			}
		}
	}