     private var containerView: UIView!
     private var focusIndicatorView: UIView!
     private var flashButton: UIButton!
-    private var widgetOrientation : UIInterfaceOrientation = .Portrait
-//    private var deviceOrientation : UIDeviceOrientation = UIDevice.currentDevice().orientation {
-//        didSet {
-//            switch deviceOrientation {
-//            case .FaceDown, .FaceUp, .Unknown:
-//                ()
-//            case .LandscapeLeft:
-//                widgetOrientation = .LandscapeLeft
-//            case .LandscapeRight:
-//                widgetOrientation = .LandscapeRight
-//            case .Portrait:
-//                widgetOrientation = .Portrait
-//            case .PortraitUpsideDown:
-//                widgetOrientation = .PortraitUpsideDown
-//            }
-//            updateWidgetsToOrientation(widgetOrientation)
-//        }
-//    }
+//    private var widgetOrientation : UIInterfaceOrientation = .Portrait
     private var pickerButton : UIButton!
     private var closeButton : UIButton!
     private let buttonMargin : CGFloat = 12

        flashButton.layer.anchorPoint = CGPointMake(0.5, 0.5)
        pickerButton.layer.anchorPoint = CGPointMake(0.5, 0.5)

        var flashPosition = CGPointMake(buttonMargin - (buttonMargin/3), buttonMargin)
        var pickerPosition = CGPointMake(view.bounds.width - (pickerButton.bounds.size.width/2 - buttonMargin), buttonMargin)
        if orientation == .Portrait || orientation == .PortraitUpsideDown {
            pickerPosition = CGPointMake(view.bounds.width - (pickerButton.bounds.size.width + buttonMargin), buttonMargin)
            flashPosition = CGPointMake(buttonMargin, buttonMargin)
        }

        var radians : CGFloat {
            switch orientation {
            case .LandscapeLeft:
                return CGFloat(M_PI/2)
            case .LandscapeRight:
                return CGFloat(-M_PI/2)
            default:
                return 0
            }
        }
        let animations = {
            let rotation = CGAffineTransformMakeRotation(radians)
            self.pickerButton.transform = rotation
            self.pickerButton.frame.origin = pickerPosition

            self.flashButton.transform = rotation
            self.flashButton.frame.origin = flashPosition

            self.closeButton.transform = rotation

            for cell in self.collectionView.visibleCells() {
                cell.contentView.transform = rotation
            }
        }
        UIView.animateWithDuration(0.25, animations: animations)

        }

        NSNotificationCenter.defaultCenter().addObserverForName(UIDeviceOrientationDidChangeNotification, object: nil, queue: nil) { (NSNotification) -> Void in
            switch UIDevice.currentDevice().orientation {
            case .FaceDown, .FaceUp, .Unknown:
                ()
            case .LandscapeLeft:
                self.updateWidgetsToOrientation(.LandscapeLeft)
            case .LandscapeRight:
                self.updateWidgetsToOrientation(.LandscapeRight)
            case .Portrait:
                self.updateWidgetsToOrientation(.Portrait)
            case .PortraitUpsideDown:
                self.updateWidgetsToOrientation(.PortraitUpsideDown)
            }
        }
    }

