Solutions to issues: 4, 5, 6, 7, 8 (table pagination)