refactored router and removed index.html in code