Tidy up message sent to websocket