         console.log(
           "Invalid item type: " + details.type
         )
+      
+    # Add text aliases for possible route items.
+    Action.addAliases()
         
     # Build message-related lookup structures.
     MessageUtil.buildLookups()

    @nameCellClass = 'name-level'
    
    @starNameId = details.star_name
      
    # The super call added @name as an alias. Here we add more aliases.
    
    replaceLastChar = (s1, s2) -> s1.slice(0, s1.length - 1) + s2
    
    # TODO: Organize this aliasing thing better so that you can apply an
    # alias to an alias. e.g. you can go like Good Egg L -> Good Egg H ->
    # Good Egg Hidden in a DRY way.
    
    if @name.endsWith(" C")
      # Add alias that replaces C with 4, or Comet
      @addAlias(replaceLastChar(@name, "4"))
      @addAlias(replaceLastChar(@name, "Comet"))
      @nameCellClass = 'name-level-comet'
      
    if @name.endsWith(" P")
      # Add alias that replaces P with 100, or Purple Coins
      @addAlias(replaceLastChar(@name, "100"))
      @addAlias(replaceLastChar(@name, "Purple Coins"))
      if @name is "Gateway P"
        @addAlias(replaceLastChar(@name, "2"))
      else
        @addAlias(replaceLastChar(@name, "5"))
        @nameCellClass = 'name-level-comet'
        
    if @name.endsWith(" H") or @name is "Good Egg L" \
     or @name is "Honeyhive L" or @name is "Buoy Base G"
      @addAlias(replaceLastChar(@name, "H"))
      @addAlias(replaceLastChar(@name, "Hidden"))
      @addAlias(replaceLastChar(@name, "S"))
      @addAlias(replaceLastChar(@name, "Secret"))
      
      if @name is "Buoy Base G"
        @addAlias(replaceLastChar(@name, "2"))
      else
        @addAlias(replaceLastChar(@name, "6"))
        
    if @name is "Battlerock L" or @name is "Dusty Dune G"
      @addAlias(replaceLastChar(@name, "H2"))
      @addAlias(replaceLastChar(@name, "7"))
      
    if @name is "Battlerock L"
      @addAlias(replaceLastChar(@name, "G"))
      
    if @name.endsWith(" L")
      @addAlias(replaceLastChar(@name, "Luigi"))
      
    if @name.slice(-1) not in (digit.toString() for digit in [0..9])
      # Does not end in a number, must be a galaxy with only one star.
      # Accept an alias ending in " 1".
      @addAlias(@name + " 1")
      
    if @name.startsWith("Bowser's ")
      # Can omit
      @addAlias(@name.replace("Bowser's ", ""))
      @addAlias(@name.replace("Bowser's ", "") + " 1")
    else if @name.startsWith("Bowser Jr.'s ")
      # Can omit
      @addAlias(@name.replace("Bowser Jr.'s ", ""))
      @addAlias(@name.replace("Bowser Jr.'s ", "") + " 1")
      
    # Add to starNameLookup.
    # Note: This requires messages to be initialized before levels.

      return Action.aliases[line]
      
    # Check for just the star name
    if line of Level.starNameLookup
      return Level.starNameLookup[line.toLowerCase()]
      
    # Check if there's a dash, and if so, see if we can find a
