Fixed the bug causing the game to crash when connected to by the client. Also, Multithreaded the client so that reads and writes can happen simulataneously.