Splitting websocket logic into multiple classes