Changed the event processing loop to avoid getting backed up with X events.  Also changed the structure of the communication-queue in the process, though most of the code is not currently in use