Add some comments, fix a variable sorting, and put score sorting back to reverse.