removing br tags and reordering empty header sections at top