Use lexer to parse header for 12x performance improvement
Add header parsing tests. Add benchmark tests.