Added the connection management code, and a dummy AuthorizationThread and EventWorker