Refactored item_name and supporting functions.