Refactored ajax calls on vote buttons