Little more testing necessary but I think the websocket part works