Cleanup from initial rails implementation
fixes N+1 queries
Fixes tests for voting