Added pagination to the index page