             stop = self.stopButtonItem,
             close = self.closeButtonItem,
             safari = self.safariButtonItem else { return }
+
         let flexSpace = UIBarButtonItem(barButtonSystemItem: .FlexibleSpace, target: nil, action: nil)
-        if webView.loading {
-            toolBar.setItems([close, flexSpace, back, flexSpace, stop, flexSpace, forward, flexSpace, safari], animated: true)
-        } else {
-            toolBar.setItems([close, flexSpace, back, flexSpace, refresh, flexSpace, forward, flexSpace, safari], animated: true)
-        }
+        let refreshOrStopItem = webView.loading ? stop : refresh
+        toolBar.setItems([close, flexSpace, back, flexSpace, refreshOrStopItem, flexSpace, forward, flexSpace, safari], animated: true)
     }
 
     // MARK: Actions


    deinit {
        NSNotificationCenter.defaultCenter().removeObserver(self)
    }

    override func viewWillAppear(animated: Bool) {

        backButtonItem?.enabled = webView.canGoBack
        forwardButtonItem?.enabled = webView.canGoForward
        titleLabel.text = currentValidURL().absoluteString
    }

    func webView(webView: UIWebView, didFailLoadWithError error: NSError?) {
        updateBarItems()
    }

    // MARK: Toolbar
