Refactor headers to reduce duplicate code.