Added URI cleanup code for parsers