Rename and restructure code

Rename to lowercase index.html.
Move certain code into preferred places.