Refactored vote model and controller.