Improve communication over websocket