       updates["#{i[0]}._name"] = i[1]
 
   if actions.parameterNames?
-    newAliases = {} # possible new aliased parameters
     for p in actions.parameterNames
       if OBJECT_REGEX.test(p[0])
         path = p[0]

      updates["#{path}_timestamp"] = now

      # Add parameter (sans any dot suffix) if has an alias
      newAliases[pp] = a if (a = parameters.getAlias(pp = path.slice(0, -1)))?

  if actions.customCommands?
    for p in actions.customCommands

    db.devicesCollection.update({'_id' : currentRequest.deviceId}, {'$set' : updates, '$unset' : deletes}, {}, (err, count) ->
      throw err if err
      # Clear aliases cache if there's a new aliased parameter that has not been included in aliases cache
      if newAliases?
        db.getAliases((aliases) ->
          for p, a of newAliases
            if not aliases[a]? or p not in aliases[a]
              db.redisClient.del('aliases', (err, res) ->
