Adjusted mechanism to further separate the scanning and parsing