html template restructuring