Refactored formatVote into ostracon, refactored begin() into initWebSocket, handle connection dropouts