Refactor assert_valid_name to use guard conditions
Create constants for error messages
Correct Regex to test against an exact match for the name
Simplify generate new name