Refactoring of the code to make the index pages as the root routing page