Refactor HeaderConfig to separate file.