Fix headers for new layout, make more resiliant to future changes