         tableView.reloadData()
     }
     
-    // MARK: - Init
-    
-    required init?(coder aDecoder: NSCoder) {
-        super.init(coder: aDecoder)
-        commonInit()
-    }
-    
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-        commonInit()
-    }
-    
-    private func commonInit() {
-        configureUI()
-        opacity = config.opacity
-    }
-    
-    // MARK: - Actions
-    
-    func didTapToggleToolbarButton(_ sender: UIButton) {
-        toggleToolbar()
-    }
-    
-    func didTapForwardTouchesButton(_ sender: UIButton) {
-        forwardTouchesButton.isSelected = !forwardTouchesButton.isSelected
-        aelog("Forward Touches [\(forwardTouchesButton.isSelected)]")
-    }
-    
-    func didTapAutoFollowButton(_ sender: UIButton) {
-        autoFollowButton.isSelected = !autoFollowButton.isSelected
-        aelog("Auto Follow [\(autoFollowButton.isSelected)]")
-    }
-    
-    func didTapClearLogButton(_ sender: UIButton) {
-        brain.clearLog()
-    }
-    
-    func didTapExportButton(_ sender: UIButton) {
-        brain.exportAllLogLines()
-    }
-    
-    func didTapFilterClearButton(_ sender: UIButton) {
-        textField.resignFirstResponder()
-        if !brain.isEmpty(textField.text) {
-            brain.filterText = nil
-        }
-        textField.text = nil
-    }
-    
-    func didRecognizeUpdateOpacityGesture(_ sender: UIPanGestureRecognizer) {
-        if sender.state == .ended {
-            if toolbarActive {
-                let xTranslation = sender.translation(in: menuView).x
-                if abs(xTranslation) > (3 * Layout.MagicNumber) {
-                    let location = sender.location(in: menuView)
-                    let opacity = opacityForLocation(location)
-                    self.opacity = opacity
-                }
-            }
-        }
-    }
-    
-    func didRecognizeHideConsoleGesture(_ sender: UITapGestureRecognizer) {
-        toggleUI()
-    }
-    
-    // MARK: - Helpers
-    
-    private func opacityForLocation(_ location: CGPoint) -> CGFloat {
-        let calculatedOpacity = ((location.x * 1.0) / 300)
-        let minOpacity = max(0.1, calculatedOpacity)
-        let maxOpacity = min(0.9, minOpacity)
-        return maxOpacity
-    }
-    
-    private func toggleToolbar() {
-        filterViewTop.constant = toolbarActive ? Layout.FilterCollapsedTop : Layout.FilterExpandedTop
-        menuViewLeading.constant = toolbarActive ? Layout.MenuCollapsedLeading : Layout.MenuExpandedLeading
-        let alpha: CGFloat = toolbarActive ? 0.3 : 1.0
-        
-        UIView.animate(withDuration: 0.3, animations: {
-            self.filterView.alpha = alpha
-            self.menuView.alpha = alpha
-            self.filterView.layoutIfNeeded()
-            self.menuView.layoutIfNeeded()
-        })
-        
-        if toolbarActive {
-            textField.resignFirstResponder()
-        }
-        
-        toolbarActive = !toolbarActive
-    }
-    
-    // MARK: - UI
-    
-    private func configureUI() {
+}
+
+// MARK: - UI
+
+extension View {
+    
+    fileprivate func configureUI() {
         configureOutlets()
         configureLayout()
     }

        NSLayoutConstraint.activate([leading, trailing, top, bottom])
    }
    
    // MARK: - Override
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
        updateContentLayout()
    }
    
    override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
        let hitView = super.hitTest(point, with: event)
        
        let filter = hitView?.superview == filterStack
        let menu = hitView?.superview == menuStack
        if !filter && !menu && forwardTouchesButton.isSelected {
            return nil
        }
        
        return hitView
    }
    
    override var canBecomeFirstResponder : Bool {
        return true
    }
    
    override func motionEnded(_ motion: UIEventSubtype, with event: UIEvent?) {
        if motion == .motionShake {
            if config.isShakeGestureEnabled {
                toggleUI()
            }
        }
    }
    
}

    }
    
    private func updateContentOffset() {
        if isToolbarActive {
            if tableView.contentOffset.y == -topInsetSmall {
                let offset = CGPoint(x: tableView.contentOffset.x, y: -topInsetLarge)
                tableView.setContentOffset(offset, animated: true)
