Added pagination on the list view and the detail view.