Ranking implemented. Ranking is processed in database by now.
SQL to update votes values.