Fixes for test suite.
Implemented a faster page sorting for language trees