Moved some web socket classes to the model