Refactor read header code.