cleaned up WebSocket example a little