         return true
     }
     
-    open func setupDevices() {
-        let devices = AVCaptureDevice.devices(withMediaType: AVMediaTypeVideo) as! [AVCaptureDevice]
-        
-        for device in devices {
-            if device.position == .back {
-                self.captureDeviceRear = device
-            }
-            
-            if device.position == .front {
-                self.captureDeviceFront = device
-            }
-        }
-        
-        switch self.defaultCaptureDevice {
-        case .front:
-            self.currentDevice = self.captureDeviceFront ?? self.captureDeviceRear
-        case .rear:
-            self.currentDevice = self.captureDeviceRear ?? self.captureDeviceFront
-        }
-    }
+    // MARK: - Setup
     
     let bottomView = UIView()
-    
     open func setupUI() {
         self.view.backgroundColor = UIColor.black
         self.view.addSubview(self.contentView)

        captureButton.center = CGPoint(x: bottomView.bounds.width / 2, y: bottomView.bounds.height / 2)
        captureButton.autoresizingMask = [.flexibleLeftMargin, .flexibleRightMargin]
        bottomView.addSubview(captureButton)
        
        // cancel button
        let cancelButton: UIButton = {

        }
        
        if let stillImageOutput = self.stillImageOutput {
            self.captureButton.isEnabled = false
            
            DispatchQueue.global().async(execute: {
                if let connection = stillImageOutput.connection(withMediaType: AVMediaTypeVideo) {
