             ThemeButton(theme: ReaderModeTheme.Print)
         ]
 
-        setupButtons(themeButtons, inRow: rows[2], action: "SELchangeTheme:")
+        setupButtons(themeButtons, inRow: themeRow, action: "SELchangeTheme:")
 
         // Setup the brightness slider
 
         let slider = UISlider()
         slider.tintColor = UIColor.orangeColor()
-        rows[3].addSubview(slider)
+        sliderRow.addSubview(slider)
         slider.addTarget(self, action: "SELchangeBrightness:", forControlEvents: UIControlEvents.ValueChanged)
 
         slider.snp_makeConstraints { make in
-            make.center.equalTo(self.rows[3].center)
+            make.center.equalTo(sliderRow.center)
             make.width.equalTo(180)
         }
 

            FontTypeButton(fontType: ReaderModeFontType.Serif)
        ]
        
        setupButtons(fontTypeButtons, inRow: rows[0], action: "SELchangeFontType:")

        // Setup the font size buttons



        // Setup the rows. It is easier to setup a layout like this when we organize the buttons into rows.

        let fontTypeRow = UIView(), fontSizeRow = UIView(), themeRow = UIView(), sliderRow = UIView()
        rows = [fontTypeRow, fontSizeRow, themeRow, sliderRow]

        for (idx, row) in enumerate(rows) {
            view.addSubview(row)

            // The only row with a full white background is the one with the slider. The others are the default
            // clear color so that the gray dividers are visible between buttons in a row.
            if row == sliderRow {
                row.backgroundColor = UIColor.whiteColor()
            }

