Fix matching of identifiers, remove other unneeded stuff.