Refactoring index page