Fixed a horrible freezing bug
Finished implementing the chat client. Verified working.