Refactoring the reading of headers for a balance of simple API and simple usage in reading code.