Cut down unnecessary sql calls and made code easier to read
Removed unneessary space
Fix for counting user votes
Reduced queries to database in updateKarma
Removed console log
Merge pull request #151 from stangah/sqlOptimize

Looks great. I pulled this code to my local branch and tested it out there. Fine by me.