Move websocket to a class instance variable.