refactoring index page and integration test