Refactoring to DRY up magic string