Some more work on pagination and making it work