Modified the index.html and simplified the JS script