Slightly refactor the parser.