Added pagination to index template