   var range : NSRange { return result.range }
 }
 
-private class Regex {
+private class SVGRegex {
   let re : NSRegularExpression
   init(pattern: String) {
     re = try! NSRegularExpression(pattern: pattern, options: NSRegularExpressionOptions())
   }
-  func firstMatchInString(string : String) -> Match? {
+  func firstMatchInString(string : String) -> SVGRegexMatch? {
     let nss = string as NSString
     if let tr = re.firstMatchInString(string, options: NSMatchingOptions(), range: NSRange(location: 0, length: nss.length)) {
-      return Match(string: string, result: tr)
+      return SVGRegexMatch(string: string, result: tr)
     }
     return nil
   }
-  func matchesInString(string : String) -> [Match] {
+  func matchesInString(string : String) -> [SVGRegexMatch] {
     let nsS = string as NSString
-    return re.matchesInString(string, options: NSMatchingOptions(), range: NSRange(location: 0, length: nsS.length)).map { Match(string: string, result: $0) }
+    return re.matchesInString(string, options: NSMatchingOptions(), range: NSRange(location: 0, length: nsS.length)).map { SVGRegexMatch(string: string, result: $0) }
   }
 }
 


// MARK: Path parsing

private let pathSplitter = Regex(pattern: "([a-zA-z])([^a-df-zA-DF-Z]*)")
private let pathArgSplitter = Regex(pattern: "([+-]?\\d*\\.?\\d*(?:[eE][+-]?\\d+)?)\\s*,?\\s*")

private enum PathInstruction {
  case ClosePath

private func *=(inout left: SVGMatrix, right: SVGMatrix) {
  left = left * right
}

private extension CGRect {
  func transformedBoundingBox(transform: SVGMatrix) -> CGRect {
