Ranking and lots of cleanup.