Added support for pagination of index page.