Latest changes for websocket implementation 2