Remove unnecessary elseifs
Refactor vote for object with no identity
Object null check only needed once
Values don't change, looping is redundant
If no support for any attributes abstain from voting
Add test for empty attributes array