Votes controller: Add error checking for votes

Fix some spacing issues.