Rewrote the parser to use more regular expressions, which helps performance