     }
 
     func updateTabCount(count: Int) {
-
-        // make a 'clone' of the tabs button
-        let newTabsButton = InsetButton()
-        newTabsButton.setTitleColor(URLBarViewUX.BackgroundColor, forState: UIControlState.Normal)
-        newTabsButton.titleLabel?.layer.backgroundColor = UIColor.whiteColor().CGColor
-        newTabsButton.titleLabel?.layer.cornerRadius = 2
-        newTabsButton.titleLabel?.font = AppConstants.DefaultSmallFontBold
-        newTabsButton.titleLabel?.textAlignment = NSTextAlignment.Center
-
-        self.addSubview(newTabsButton)
-
-        // copy constraints from original button for positioning
+        // Make a clone of the tabs button.
+        let newTabsButton = makeTabsButton(count)
+
+        // Copy constraints from original button, offset by the anchor position.
         newTabsButton.snp_makeConstraints { make in
-            make.edges.equalTo(self.tabsButton)
-        }
-
-        newTabsButton.titleLabel?.snp_makeConstraints { make in
-            make.size.equalTo(URLBarViewUX.TabsButtonHeight)
-            return
-        }
-
-        if let anchor = tabsButton.titleLabel?.layer.anchorPoint {
-            newTabsButton.titleLabel?.layer.anchorPoint = anchor
-        }
-
-        newTabsButton.setTitle(count.description, forState: .Normal)
-
-        // setup the rotation matrix
+            make.size.centerX.equalTo(tabsButton)
+            make.centerY.equalTo(self.tabsButton).offset((URLBarViewUX.TabsButtonRotationOffset - 0.5) * URLBarViewUX.TabsButtonHeight)
+        }
+
+        // Set the anchor to the bottom of the label so it flips up.
+        newTabsButton.titleLabel?.layer.anchorPoint = CGPoint(x: 0.5, y: URLBarViewUX.TabsButtonRotationOffset)
+
+        // Set up the rotation matrix.
         var flipTransform = CATransform3DIdentity
         flipTransform.m34 = -1.0 / 200.0 // add some perspective
         flipTransform = CATransform3DRotate(flipTransform, CGFloat(-M_PI_2), 1.0, 0.0, 0.0)
         newTabsButton.titleLabel?.layer.transform = flipTransform
 
-        // offset the target rotation by 180º so the new tab comes from the front and the old tab falls back
+        // Offset the target rotation by 180º so the new tab comes from the front and the old tab falls back.
         flipTransform = CATransform3DRotate(flipTransform, CGFloat(M_PI), 1.0, 0.0, 0.0)
-
 
         UIView.animateWithDuration(1.0, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0.0, options: UIViewAnimationOptions.CurveEaseInOut, animations: { _ in
                 newTabsButton.titleLabel?.layer.transform = CATransform3DIdentity
                 self.tabsButton.titleLabel?.layer.transform = flipTransform
                 self.tabsButton.alpha = 0
             }, completion: { _ in
-                // remove the clone and setup the actual tab button
+                // Remove the clone and set up the actual tabs button.
                 newTabsButton.removeFromSuperview()
                 self.tabsButton.alpha = 1
                 self.tabsButton.titleLabel?.layer.transform = CATransform3DIdentity
                 self.tabsButton.setTitle(count.description, forState: UIControlState.Normal)
                 self.tabsButton.accessibilityValue = count.description
-                self.tabsButton.accessibilityLabel = NSLocalizedString("Show Tabs", comment: "Accessibility label for the tabs button in the (top) browser toolbar")
         })
     }
 

        self.progressBar.hidden = true
        self.addSubview(progressBar)

        tabsButton = InsetButton()
        tabsButton.setTranslatesAutoresizingMaskIntoConstraints(false)
        tabsButton.setTitleColor(URLBarViewUX.BackgroundColor, forState: UIControlState.Normal)
        tabsButton.accessibilityLabel = NSLocalizedString("Show Tabs", comment: "Accessibility Label for the urlbar tabs button")
        tabsButton.titleLabel?.layer.backgroundColor = UIColor.whiteColor().CGColor
        tabsButton.titleLabel?.layer.cornerRadius = 2
        tabsButton.titleLabel?.font = AppConstants.DefaultSmallFontBold
        tabsButton.titleLabel?.textAlignment = NSTextAlignment.Center
        tabsButton.titleLabel?.layer.anchorPoint = CGPoint(x: 0.5, y: URLBarViewUX.TabsButtonRotationOffset)
        tabsButton.titleLabel?.snp_makeConstraints { make in
            make.size.equalTo(URLBarViewUX.TabsButtonHeight)
            return
        }
        tabsButton.addTarget(self, action: "SELdidClickAddTab", forControlEvents: UIControlEvents.TouchUpInside)
        tabsButton.setContentHuggingPriority(1000, forAxis: UILayoutConstraintAxis.Horizontal)
        tabsButton.setContentCompressionResistancePriority(1000, forAxis: UILayoutConstraintAxis.Horizontal)
        self.addSubview(tabsButton)

        cancelButton = InsetButton()
        cancelButton.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)


        // Make sure we hide any views that shouldn't be showing in non-editing mode
        finishEditingAnimation(false)
    }

    private func makeTabsButton(count: Int) -> UIButton {
        let tabsButton = InsetButton()
        tabsButton.setTitle(count.description, forState: UIControlState.Normal)
        tabsButton.setTitleColor(URLBarViewUX.BackgroundColor, forState: UIControlState.Normal)
        tabsButton.titleLabel?.layer.backgroundColor = UIColor.whiteColor().CGColor
        tabsButton.titleLabel?.layer.cornerRadius = 2
        tabsButton.titleLabel?.font = AppConstants.DefaultSmallFontBold
        tabsButton.titleLabel?.textAlignment = NSTextAlignment.Center
        tabsButton.setContentHuggingPriority(1000, forAxis: UILayoutConstraintAxis.Horizontal)
        tabsButton.setContentCompressionResistancePriority(1000, forAxis: UILayoutConstraintAxis.Horizontal)

        self.addSubview(tabsButton)

        tabsButton.titleLabel?.snp_makeConstraints { make in
            make.size.equalTo(URLBarViewUX.TabsButtonHeight)
        }

        return tabsButton
    }

    private func updateToolbarConstraints() {
