Agree, and `ReplaceInvalidChars` and `VerifyAppName` could be merged and simplified with regex.