Making index html work with mobile and updating ui