Refactor index page.