    */
   public func property<T>(_ key: String, dictionary: T? = nil) -> T? {
     // TODO: Improve this to support nested attributes
-    let components = key.split(".")
+    let components = key.components(separatedBy: ".")
     let values = Mirror(reflecting: self)
       .children
       .filter({$0.0 == components.first})

  }

  /**
  - Returns: A string based dictionary.
  */
  public func types() -> [String : String] {
    var types = [String : String]()
    for tuple in Mirror(reflecting: self).children {

    var result = value as? T

    let tail = components.dropFirst()
    let type = Mirror.init(reflecting: value)

    if type.displayStyle == .optional && type.children.count != 0,
      let (_, value) = type.children.first {
      result = value as? T
    }

    if let indexString = tail.first,
      let index = Int(indexString) {
      guard let result = (value as? [T])?[index] else { return nil }

      if tail.count > 1 {
        guard let range = key.range(of: indexString) else { return nil }
        let key = key.substring(from: range.lowerBound)
        return property(key, dictionary: result)
      } else {
        return result
      }
    }

    return result
