Move websocket stuff to it's own class