removed unused code and reorganized index.html