Remove class attributes in favor of instance attributes. This allows each instance of the controller class to have their own websocket object, for example, instead of sharing one (which can lead to read conflicts)
Recreate the websocket object after disconnect to allow reconnections (websockets that have been disconnected can/should not be reused)
Two small but important fixes: