Huge refactor on index.html