Work on reverting sorts

Currently broken.