Rename client to connection, for consistency with the book
Add a Chat class, for consistency with the book