     }
     
     internal func focusEnded() {
-        if let device = self._currentDevice {
-            guard !device.isAdjustingFocus
-            else {
-                return
-            }
-            
-            let isAutoFocusEnabled: Bool = (device.focusMode == .autoFocus ||
-                device.focusMode == .continuousAutoFocus)
-            if isAutoFocusEnabled {
-                do {
-                    try device.lockForConfiguration()
-                    
-                    device.isSubjectAreaChangeMonitoringEnabled = true
-                    
-                    device.unlockForConfiguration()
-                }
-                catch {
-                    print("NextLevel, focus ending failed to lock device for configuration")
-                }
-            }
-            
-            DispatchQueue.main.async {
-                self.deviceDelegate?.nextLevelDidStopFocus(self)
-            }
-            
+        guard let device = self._currentDevice,
+                !device.isAdjustingFocus
+        else {
+            return
+        }
+        
+        let isAutoFocusEnabled: Bool = (device.focusMode == .autoFocus ||
+            device.focusMode == .continuousAutoFocus)
+        if isAutoFocusEnabled {
+            do {
+                try device.lockForConfiguration()
+                
+                device.isSubjectAreaChangeMonitoringEnabled = true
+                
+                device.unlockForConfiguration()
+            }
+            catch {
+                print("NextLevel, focus ending failed to lock device for configuration")
+            }
+        }
+        
+        DispatchQueue.main.async {
+            self.deviceDelegate?.nextLevelDidStopFocus(self)
         }
     }
     

    }
    
    internal func exposureEnded() {
        if let device = self._currentDevice {
            guard
                !device.isAdjustingFocus ||
                    !device.isAdjustingExposure
                else {
                    return
            }
            
            let isContinuousAutoExposureEnabled: Bool = (device.exposureMode == .continuousAutoExposure)
            if isContinuousAutoExposureEnabled {
                do {
                    try device.lockForConfiguration()
                    
                    device.isSubjectAreaChangeMonitoringEnabled = true
                    
                    device.unlockForConfiguration()
                }
                catch {
                    print("NextLevel, focus ending failed to lock device for configuration")
                }
            }
            
            DispatchQueue.main.async {
                self.deviceDelegate?.nextLevelDidChangeExposure(self)
            }
        }
    }
    

    ///
    /// - Parameter adjustedPoint: The point of interest for focus
    public func focusAtAdjustedPointOfInterest(adjustedPoint: CGPoint) {
        guard let device = self._currentDevice,
                !device.isAdjustingFocus,
                !device.isAdjustingExposure
        else {
            return
        }
        
        do {
            try device.lockForConfiguration()
            
            if device.isFocusPointOfInterestSupported && device.isFocusModeSupported(.autoFocus) {
                let focusMode = device.focusMode
                device.focusPointOfInterest = adjustedPoint
                device.focusMode = focusMode
            }
            
            device.unlockForConfiguration()
        }
        catch {
            print("NextLevel, focusAtAdjustedPointOfInterest failed to lock device for configuration")
        }
    }
    
