Ranking added, solved minor bugs