General reorganization of classes + Web socket