Updates to the test suite for datatables and refactored the sorting to.