fixed sort order. lots of other nice things.