Rewrote client-side threading and IO to one thread and changed interthread communication to use queues