 import UIKit.UIStoryboard
 
 private var kMainStoryboardName: String {
-    let info = NSBundle.mainBundle().infoDictionary
+    let info = Bundle.main.infoDictionary
     
     if let value = info?["UIMainStoryboardFile"] as? String {
         return value
     }
     else {
-        return "Main"//default name for main storyboard
+        print("Default name for main storyboard not specified in the project settings.")
+        return "Main"//default name for main storyboard (usually created with that name)
     }
 }
 
 extension UIStoryboard {
     
-    class var mainStoryboard: UIStoryboard {
+    class var main: UIStoryboard {
         struct Static {
             static let instance: UIStoryboard = UIStoryboard(name: kMainStoryboardName)
         }

    }
    
    convenience init(name: String) {
        self.init(name: name, bundle: NSBundle.mainBundle())
    }
}

    class func storyboard(name: String) -> UIStoryboard {
        
        //there is no localized universal storyboard
        if let storyboardURL = Bundle.main.url(forResource: name, withExtension: "storyboardc") {
            if FileManager.default.fileExists(atPath: storyboardURL.path) {//there is no localized universal storyboard
                return UIStoryboard(name: name)
            }
            //there is no universal storyboard
            if UIDevice().userInterfaceIdiom == .pad {//there is no localized ipad storyboard
                let iPadStoryboardName = name + "_iPad"//Specified by the naming rule, to separate resources
                return UIStoryboard(name: iPadStoryboardName)
            }
