Fix bug with vote classes, simplify code