   addAlias: (alias) ->
     # Add to the class variable 'aliases'.
     # Map from alias to the standard name.
-    @constructor.aliases[alias] = this
+    # Make all aliases lowercase, so we can do case insensitive recognition.
+    @constructor.aliases[alias.toLowerCase()] = this
+    
+    
+  @addAliases: () ->
+      
+    # The Level constructor added a basic alias for every level: the level
+    # name itself.
+    # Here we add more aliases for various actions (mostly levels).
+    
+    replaceLastChar = (s1, s2) -> s1.slice(0, s1.length - 1) + s2
+    
+    # Make a way to filter aliases based on a boolean test.
+    getAliases = (boolFunc) ->
+      if not boolFunc?
+        return Action.aliases
+      
+      aliasSubset = {}
+      for alias, action of Action.aliases
+        if boolFunc(alias)
+          aliasSubset[alias] = action
+      return aliasSubset
+      
+    for alias, action of getAliases((a) -> a.endsWith(" c"))
+      # Add alias that replaces c with 4, or comet
+      action.addAlias replaceLastChar(alias, "4")
+      action.addAlias replaceLastChar(alias, "comet")
+        
+    for alias, action of getAliases((a) -> a.endsWith(" p"))
+      action.addAlias replaceLastChar(alias, "100")
+      action.addAlias replaceLastChar(alias, "purples")
+      action.addAlias replaceLastChar(alias, "purple coins")
+      if alias is "gateway p"
+        action.addAlias replaceLastChar(alias, "2")
+      else
+        action.addAlias replaceLastChar(alias, "5")
+        
+    for alias, action of getAliases()
+      if alias in ["good egg l", "honeyhive l", "buoy base g"]
+        action.addAlias replaceLastChar(alias, "h")
+          
+      if alias in ["battlerock l", "dusty dune g"]
+        action.addAlias replaceLastChar(alias, "h2")
+        action.addAlias replaceLastChar(alias, "7")
+        
+      if alias is "battlerock l"
+        action.addAlias replaceLastChar(alias, "g")
+    
+    for alias, action of getAliases((a) -> a.endsWith(" h"))
+      
+      action.addAlias replaceLastChar(alias, "hidden")
+      action.addAlias replaceLastChar(alias, "s")
+      action.addAlias replaceLastChar(alias, "secret")
+        
+      if alias is "buoy base h"
+        action.addAlias replaceLastChar(alias, "2")
+      else
+        action.addAlias replaceLastChar(alias, "6")
+        
+    for alias, action of getAliases((a) -> a.endsWith(" l"))
+      action.addAlias replaceLastChar(alias, "luigi")
+    
+    for alias, action of getAliases((a) -> a.endsWith(" g"))
+      action.addAlias replaceLastChar(alias, "green")
+      
+    for alias, action of getAliases((a) -> a.startsWith("bowser's "))
+      # Can omit this part
+      action.addAlias alias.replace("bowser's ", "")
+      
+    for alias, action of getAliases((a) -> a.startsWith("bowser jr.'s "))
+      # Can omit this part
+      action.addAlias alias.replace("bowser jr.'s ", "")
+        
+    starEndings = [
+      '1','2','3','4','5','6','7',
+      'h','hidden','s','secret',
+      'g','green','l','luigi',
+      'c','comet','p','purples','purple coins','100',
+    ]
+    for alias, action of getAliases((a) -> not a.endsWith(starEndings))
+      # This should be a galaxy with only one star.
+      # Accept an alias ending in " 1".
+      action.addAlias (alias + " 1")
       
       
   text: () ->

      
    
  lineToAction: (line) ->
    if line.startsWith "*"
      # Assumed to be just a comment, e.g. "* Back to start of observatory"
      return 'comment'

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