An attempt at supporting multiple value sort (fixes #160)

It's kind of a big change, but I'm curious if you think I'm going down the right path?