Removed duplicate code

Why the duplicate code in `generateName()` instead of just calling the setter for `name`?