Test client.names(), and fix some minor bugs in gather_messages.