     }
     
     func configureAnimationItems(animationType: AnimationType) {
+        
+        guard let animationViewSuperView = animationView?.subviews else {
+            fatalError()
+        }
+        
         if animationType == .Open {
-            for view in animationView!.subviews.filter({$0 is RotatedView}) {
+            for view in animationViewSuperView.filter({$0 is RotatedView}) {
                 view.alpha = 0;
             }
         } else { // close
-            for view: RotatedView in animationView!.subviews.filter({$0 is RotatedView}) as! [RotatedView] {
+            for case let view as RotatedView in animationViewSuperView.filter({$0 is RotatedView}) {
                 if animationType == .Open {
                     view.alpha = 0
                 } else {

    }
    
    public func isAnimating()->Bool {
        guard animationItemViews != nil
        else {
            return false
        }
        
        for item in animationItemViews! {
            if item.layer.animationKeys()?.count > 0 {
                return true
            }

            delay += durations[index]
        }
        
        let firstItemView = animationView.subviews.filter{$0.tag == 0}.first
        
        if let first = firstItemView {
            first.layer.masksToBounds = true
            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(durations[0] * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
                first.layer.cornerRadius = 0
            }
        }
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { () -> Void in
            self.animationView?.alpha = 0
