Reduce the number of pages to check for sorting
Improve algorithm for checking sort sequence
PEP8 fixes
Merge pull request #232 from bobsilverberg/fewer_pages

Reduce the number of pages to check for sorting