[WIP] Sorting backend is taking tuples

What's left is to make frontend deal with tuples.