Add vote module and behavior, refactoring code