         
         PreferencesService.sharedService().hydraTabBarOrder = tagsOrder
     }
+}
+
+// MARK: UITabBarItem functions
+extension UITabBarItem {
     
-    // MARK: TabBarItem functions
-    func update(tabBarItem: UITabBarItem, title: String?, image: String, tag: Int) {
-        if let t = title {
-            tabBarItem.title = t
+    // Configure UITabBarItem with string, image and tag
+    func configure(title: String?, image: String, tag: Int) {
+        if let title = title {
+            self.title = title
         }
-        tabBarItem.image = UIImage(named: "tabbar-" + image + ".png")
-        tabBarItem.tag = tag
+        self.image = UIImage(named: "tabbar-" + image + ".png")
+        self.tag = tag
     }
 }
        super.viewDidLoad()
        self.delegate = self

        let newsViewController = UINavigationController(rootViewController: NewsViewController()) // find way without instantiating view controllers
        let activityController = UINavigationController(rootViewController: ActivitiesController())
        let restoController = UINavigationController(rootViewController: RestoMenuController())
        let infoController = UINavigationController(rootViewController: InfoViewController())

        let prefsController = UINavigationController(rootViewController: PreferencesController())
        let urgentController = UrgentViewController()
        
        restoController.tabBarItem.configure("Resto Menu", image: "resto", tag: 230)
        infoController.tabBarItem.configure(nil, image: "info", tag: 231)
        activityController.tabBarItem.configure(nil, image: "activities", tag: 232)
        schamperController.tabBarItem.configure(nil, image: "schamper", tag: 233)
        newsViewController.tabBarItem.configure(nil, image: "news", tag: 234)
        urgentController.tabBarItem.configure("Urgent.fm", image: "urgent", tag: 235)
        prefsController.tabBarItem.configure("Instellingen", image: "settings", tag: 236)

        var viewControllers = self.viewControllers!
        viewControllers.extend([restoController, infoController, activityController, newsViewController, schamperController, urgentController, prefsController])
        
