Added Event Dispatch Thread and moved all X code into it. GUI is thus now single-threaded due to X11 limitations