Changing the way the votes and options are stored, and some minor
refactoring
Done some minor refactoring