Added a basic upvoting algorithm.