Really fixed the digest loop this time

Turns out the last fix didn't actually work. My sort function was not
getting called. So, this time, I am using a custom sort function, but
instead of multiplying by a reverse variable (-1 or 1) to reverse, or
calling Array.reverse, I am reversing the order of the operands. Seems to
work properly... sigh.