Optimize reserved operator checking
Fix tests