Strip whitespace to get better match rates

Some of the match failures were simply because the parser included whitespace in the ids... this should be a quick fix for that.

(Issuing PR to discuss with Mark, but I don't remember what kind of difference this made, nor whether it required additional testing / test-fixes etc.)