Removed extraneous text and code from original assignment. Refactored preferredName function to make it shorter. Added a commented out ternary version of preferredName.