Modified index.html and fix a few bugs