Added some cleanup to the parser.