semantic rearrange

Reorganized HTML for js