     
     //MARK: Commands
     func tree() -> [String : AnyObject]? {
+        
         if self.lastSnapshot == nil {
             self.resolve()
         }

    
    func digest(windowName : String) -> String {
        let description = "\(windowName)_\(self.buttons.count)_\(self.textViews.count)_\(self.textFields.count)_\(self.otherElements.count)_\(self.traits())"

        return description
    }
    

        var info = [String : AnyObject]()
        info["type"] = XCUIElementTypeTransformer.singleton.shortStringWithElementType(snapshot.elementType) as AnyObject?
        info["rawIndentifier"] = snapshot.identifier.characters.count > 0 ? snapshot.identifier as AnyObject : nil
        info["name"] = snapshot.wdName() as AnyObject? ?? "" as AnyObject
        info["value"] = snapshot.wdValue() as AnyObject? ?? "" as AnyObject
        info["label"] = snapshot.wdLabel() as AnyObject? ?? "" as AnyObject
        info["rect"] = snapshot.wdRect() as AnyObject
        info["frame"] = NSStringFromCGRect(snapshot.wdFrame()) as AnyObject
        info["isEnabled"] = snapshot.isWDEnabled() as AnyObject
        info["isVisible"] = snapshot.isWDVisible() as AnyObject
        
        // If block is not visible, return
        if info["isVisible"] as! Bool == false {
            return info;
        }
        
        // If block is visible, iterate through all its children
        let childrenElements = snapshot.children
        if childrenElements != nil && childrenElements!.count > 0 {
            var children = [AnyObject]()
