Fixed client/server bugs, implemented single connection in client