WORKING REVISION:

refactored client to work as a chat client.