         if let initialViewControllerId = xml["document"].element?.attributes["initialViewController"],
             xmlVC = searchById(initialViewControllerId)
         {
-            let vc = ViewController(xml: xmlVC)
-            if let customClassName = vc.customClass {
-                return customClassName
-            }
-            
-            if let name = vc.name, controllerType = os.controllerTypeForElementName(name) {
-                return controllerType
-            }
+			return self.classNameForViewController(ViewController(xml: xmlVC))
         }
         return nil
     }
-    
+	
+	private func classNameForViewController(vc: ViewController) -> String? {
+		if let customClassName = vc.customClass {
+			return customClassName
+		} else if let name = vc.name, controllerType = os.controllerTypeForElementName(name) {
+			return controllerType
+		} else {
+			return nil
+		}
+	}
+	
     lazy var version: String? = self.xml["document"].element?.attributes["version"]
-    
+	
     lazy var scenes: [Scene] = {
         if let scenes = self.searchAll(self.xml, attributeKey: "sceneID"){
             return scenes.map { Scene(xml: $0) }

        switch self {
        case iOS:
            switch name {
            case "navigationController":
                return "UINavigationController"
            case "tableViewController":

            }
        case OSX:
            switch name {
			case "viewController":
				return "NSViewController"
            case "pagecontroller":
                return "NSPageController"
            case "tabViewController":
