Refactor and fix order_reverse.

Currently the order_reverse field does not work, it is always false. Also I think it is not great substring order_by then do a reverse while - works well.