Fix comparisons across the project

This improves performance because way less string objects are created, and also fix a few globalization warnings.
Yeah, it's not a critical path either, so it's not a big deal.