Corrects heading sequence, add closing tag for main element.