Some cleaning up of the server's error handling and the message route.