     }
     var rtn = HeroModifiers()
     let nsString = modifierString as NSString
-    for r in matches(for: HeroContext.modifiersRegex, text:nsString){
+    for result in matches(for: HeroContext.modifiersRegex, text:nsString){
       var rangeStr = [String]()
-      if r.numberOfRanges > 2, r.rangeAt(2).location < nsString.length{
-        let parameterString = nsString.substring(with: r.rangeAt(2)) as NSString
-        for r in matches(for: HeroContext.parameterRegex, text: parameterString){
-          rangeStr.append(parameterString.substring(with: r.range))
-        }
-      }
-      rtn.append((nsString.substring(with: r.rangeAt(1)), rangeStr))
+      if result.numberOfRanges > 2, result.rangeAt(2).location < nsString.length{
+        let parameterString = nsString.substring(with: result.rangeAt(2)) as NSString
+        for result in matches(for: HeroContext.parameterRegex, text: parameterString){
+          rangeStr.append(parameterString.substring(with: result.range))
+        }
+      }
+      rtn.append((nsString.substring(with: result.rangeAt(1)), rangeStr))
     }
     return rtn
   }

   */
  public subscript(view: UIView, modifierName:String) -> [String]? {
    get {
      guard modifiers[view] != nil else { return nil }
      for o in modifiers[view]!.reversed(){
        if o.0 == modifierName{
          return o.1
        }
      }
      return nil
    }
    set(newValue) {
      if let newValue = newValue{
        if self.modifiers[view] == nil{
          self.modifiers[view] = HeroModifiers()
        }
        for (i, o) in modifiers[view]!.enumerated(){
          if o.0 == modifierName{
            self.modifiers[view]![i] = (modifierName, newValue)
            return
          }
        }
        modifiers[view]!.append((modifierName, newValue))
      } else {
        guard modifiers[view] != nil else { return }
        for (i, o) in modifiers[view]!.enumerated(){
          if o.0 == modifierName{
            modifiers[view]!.remove(at: i)
            return
          }

  /**
   - Returns: a list of all the modifier names for a given view
   */
  public func modifierNames(for view:UIView) -> [String]? {
    return modifiers[view]?.map{ return $0.0 }
  }

