Extracting parsing of headers to separate module