Made update_score simpler and more efficient