     }
 }
 
+typealias CameraSetupComplete = ((CameraManualSetupResult) -> (Void))
+
 class Camera: NSObject {
     // MARK: properties
     internal var session: AVCaptureSession = AVCaptureSession.init()
-    internal var setupResult:CameraManualSetupResult = CameraManualSetupResult.CameraNotAuthorized
     private var sessionQueue: dispatch_queue_t = dispatch_queue_create("com.campmobile.band.Camera", DISPATCH_QUEUE_SERIAL)
-    private var backgroundRecordingID:UIBackgroundTaskIdentifier = UIBackgroundTaskInvalid
-    
-    
     private var videoDevice:AVCaptureDevice?
     private var videoDeviceInput: AVCaptureDeviceInput?
-
+    private var stillImageOutput:AVCaptureStillImageOutput?
+    
+    // MARK: Utilities
+    internal var setupResult:CameraManualSetupResult = CameraManualSetupResult.CameraNotAuthorized
+    internal private(set) var sessionRunning:Bool = false
+    private var backgroundRecordingID:UIBackgroundTaskIdentifier = UIBackgroundTaskInvalid
     
     // MARK: handler
-    var onCompleteInitialization: ((CameraManualSetupResult) -> (Void))? = nil
-    
-    private func setupWithPreview(preview:CameraPreview) {
+    var onStartCamera: ((CameraManualSetupResult) -> (Void))? = nil
+    
+    internal func setupWithPreview(preview:CameraPreview, complete:CameraSetupComplete) {
         let authorizationStatus = AVCaptureDevice.authorizationStatusForMediaType(AVMediaTypeVideo)
         
         switch (authorizationStatus) {

                        }
                    }
                }
                self.session.commitConfiguration()
                
            } catch let error as NSError {
                NSLog("Could not create video device input: %@", error )
                self.setupResult = CameraManualSetupResult.SessionConfigurationFailed
            }
        
        };
    }
    

    // Why not do all of this on the main queue?
    // Because -[AVCaptureSession startRunning] is a blocking call which can take a long time. We dispatch session setup to the sessionQueue
    // so that the main queue isn't blocked, which keeps the UI responsive.
    private func setupCaptureSession(preview:CameraPreview, complete:CameraSetupComplete) {
        dispatch_async(self.sessionQueue) {
            if ( self.setupResult != CameraManualSetupResult.Success ) {
                return;
