Remove redundent code, and modify index.html layout