change sort to sort_by

it's faster and not as much code.

I was just poking through more code and found these, so I had to fix it. I think we can probably change many of these to `sort_by(&:method)`.