Updated index.html and made main hanlder use templating