Refactored updating leaderboards