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