Add build_sorter

The tests are a bit slow, which is a little discouraging.