Extracted header logic into HeaderBuilder