Refactor parse_fields.
Add benchmarks.