                 return currentMax
             }()
             
-            var sideEdges = (isLandscape ? layoutConstants.sideEdgesPortrait(bounds.width) : layoutConstants.sideEdgesLandscape)
-            
-            let bottomEdge = sideEdges
-            
-            let normalKeyboardSize = bounds.width - CGFloat(2) * sideEdges
-            
-            let shrunkKeyboardSize = layoutConstants.keyboardShrunkSize(normalKeyboardSize)
-            
-            sideEdges += ((normalKeyboardSize - shrunkKeyboardSize) / CGFloat(2))
-
-            let topEdge: CGFloat = ((isLandscape ? layoutConstants.topEdgeLandscape : layoutConstants.topEdgePortrait(bounds.width)) + self.topBanner)
-            
-            let rowGap: CGFloat = (isLandscape ? layoutConstants.rowGapLandscape : layoutConstants.rowGapPortrait(bounds.width))
-            let lastRowGap: CGFloat = (isLandscape ? rowGap : layoutConstants.rowGapPortraitLastRow(bounds.width))
             let rowGapTotal = CGFloat(numRows - 1 - 1) * rowGap + lastRowGap
             
             let keyGap: CGFloat = (isLandscape ? layoutConstants.keyGapLandscape(bounds.width, rowCharacterCount: mostKeysInRow) : layoutConstants.keyGapPortrait(bounds.width, rowCharacterCount: mostKeysInRow))

    }
    
    func layoutKeys(model: Keyboard, views: [Key:KeyboardKey], bounds: CGRect) {
        let isLandscape: Bool = {
            let boundsRatio = bounds.width / bounds.height
            return (boundsRatio >= layoutConstants.landscapeRatio)
        }()
        
        self.banner?.frame = CGRectMake(0, 0, self.superview.bounds.width, self.topBanner)
        
        for page in model.pages {
            let numRows = page.rows.count

                let totalGaps = (sideEdges * CGFloat(2)) + (keyGap * CGFloat(mostKeysInRow - 1))
                return (bounds.width - totalGaps) / CGFloat(mostKeysInRow)
            }()
            
            for (r, row) in enumerate(page.rows) {
                let rowGapCurrentTotal = (r == page.rows.count - 1 ? rowGapTotal : CGFloat(r) * rowGap)
