Modified to use titlecase in writing out names.