Code analysis issues, localization and practice.

Specifying the culture on ToUpper and ToLower prevents cross-culture string comparison issues.

Avoiding duplicated casts improves performance (especially anything used frequently)