Restructures how things are sorted.