More work on the chatapp example.