Split code into subdirectories.
Use Signals library in WebSocketClient.