Added pagination and sorting of the tables.