Save and load sort info.
Realized that sorting only sorts the pages, I need to merge the pages together and sort then, then respread them as pages again.
This was the primary reason why I used to have the flatten function.