private void run() {
		debug("Entering main program loop...");
		debug("Running? " + this.running); // tell us whether the MUD server is running or not
		debug("Server? " + s.isRunning()); // tell us whether the underlying socket server is running

		while (running) {
			if (!input_hold) {
				// try to reduce usage of cpu time
				try {
					Thread.sleep(500);
				}
				catch(final InterruptedException ie) {
					System.out.println("--- Stack Trace ---");
					ie.printStackTrace();
				}
				
				for (final Client client : s.getClients()) {
					runHelper(client);
				}
				
				module.run();

				/* Notification Messages */

				// if we aren't delivering immediate notifications, then they'll be handled here
				if (!notify_immediate) {
					// grab and send one notification per player this loop iteration (if they have any)
					for (final Player player : messageQueues.keySet()) {
						final String message = messageQueues.get(player).poll();

						if (message != null) {
							send(message, player.getClient());
						}
					}
				}

				// TODO resolve major inefficiencies around delivering chat messages that amount to substantial cpu usage

				/* Chat Messages */
				Client client = null;
				Message msg = null;

				String chan_name = "";
				String chan_color = "";
				String text_color = "";

				// for each ChatChannel
				for (final ChatChannel cc : chan.getChatChannels()) {
					// debug("CHANNEL: " + cc.getName(), 4);

					chan_name = cc.getName();
					chan_color = cc.getChanColor();
					text_color = cc.getTextColor();
					
					msg = cc.getNextMessage();
					
					if (msg == null) {
						//debug(chan_name + ": No Messages", 4);
						continue;
					}
					
					Pair<String> colors = new Pair<String>(chan_color, text_color);
					
					final String cm = buildChatMessage(chan_name, colors , msg, true, false);
					final String cm_tag = buildChatMessage(chan_name, colors, msg, true, true);
					final String cm_log = buildChatMessage(chan_name, colors, msg, false, false); // no color for logs
					
					// for each listener of this channel, send the message
					for (final Player player : cc.getListeners()) {
						try {
							client = player.getClient();

							if (player.getConfigOption("tagged-chat")) client.write(cm_tag);
							else                                       client.write(cm);
							
							logChat( cm_log );

							debug("chat message sent successfully", 4);
						}
						catch (final NullPointerException npe) {
							debug("Game [chat channel: " + chan_name + "] > Null Message.");
							System.out.println("--- Stack Trace ---");
							npe.printStackTrace();
						}
					}
				}
			}
		}
	}