 @UIApplicationMain
 class AppDelegate: NSObject, UIApplicationDelegate, NVFlashServiceDelegate {
 
-    var flashService: NVFlashService?
-    var timer: NSTimer?
+    var flashService: NVFlashService!
+    var timer: NSTimer!
 
     func applicationDidFinishLaunching(application: UIApplication) {
         NSLog("init")

        
        // loop through all connected flashes
        // typically just 1, but change autoConnectMaxFlashes above for more
        for flash in flashService!.connectedFlashes as [NVFlash] {
            
            // toggle flash
            if (!flash.lit) {

        flashService = NVFlashService()
        
        // Optional: receive callbacks when flashes come into range or are connected/disconnected
        flashService.delegate = self
        
        // Auto connect to closest flash
        flashService.autoConnect = true
        
        // Uncomment to auto connect to more than one flash
        // flashService.autoConnectMaxFlashes = 4
        
        // Set a timer to toggle flash every second.
        timer = NSTimer.scheduledTimerWithTimeInterval(1, target: self,
