A little refactoring for voting