Refactored NameUtil class