Better way to handle index.html