Minor Changes to generatePassword