New function to generate valid instance names.
Fix crash when adding unnamed instances.
Refactor name checking into a separate function.
Added validity checks and grammar.
Merge pull request #536 from mgsdk/new-instance-name

Fix for adding instances to the GUI list with a default named instance