         basicAnimation.fromValue = transparentLayer!.opacity
         
         // animate to 0 if closed; animate to 0.5 if opening
-        if self.slideState == .Opened {
-            basicAnimation.toValue = 0.5
-            transparentLayer!.opacity = 0.5
-        } else if self.slideState == .Closed {
-            basicAnimation.toValue = 0
-            transparentLayer!.opacity = 0
-        } else { // for dragging animation I'll set the duration to 0, because setting opacity directly (w/o animation) is too slow. very crazy
-            basicAnimation.duration = 0
-            basicAnimation.toValue = Float(0.5-(progress-0.9)*(0.5)/(0.1))
-            transparentLayer!.opacity = Float(0.5-(progress-0.9)*(0.5)/(0.1))
-        }
+        basicAnimation.duration = 0
+        basicAnimation.toValue = Float(0.5-(progress-0.9)*(0.5)/(0.1))
+        transparentLayer!.opacity = Float(0.5-(progress-0.9)*(0.5)/(0.1))
+        
         
         // exec the animation function
         transparentLayer!.addAnimation(basicAnimation, forKey: self.transparentLayerAnimationKey)
         
         // Animate all the 3D stuff of the currently active VC
-        if state == .Opened || state == .Closed { // Animate the stuff directly
-            
-            UIView.animateWithDuration(0.4, animations: { () -> Void in
-                if self.slideState == .Opened {
-                    self.activeChild?.view.layer.transform = CATransform3DMakeScale(self.zoomFactor,self.zoomFactor,self.zoomFactor)
-                } else if self.slideState == .Closed {
-                    self.activeChild?.view.layer.transform = CATransform3DIdentity
-                }
+        if self.slideState == .Opened {
+            UIView.animateWithDuration(0.1, animations: { 
+                self.activeChild?.view.layer.transform = CATransform3DScale(CATransform3DIdentity, self.zoomFactor, self.zoomFactor, self.zoomFactor)
             })
-            
-        } else { // "smooth" animate
-            
+        } else {
             var transform: CATransform3D = CATransform3DIdentity;
             transform.m34 = 1.0 / 400.0; // This is something like the CSS command "perspective:"
             transform = CATransform3DRotate(transform, 1-progress, 0, 1, 0)
             transform = CATransform3DScale(transform, progress, progress, progress)
             self.activeChild?.view.layer.transform = transform;
-            
         }
     }
     

        switch recognizer.state {
        case .Changed, .Began, .Possible: // The animation is going on or just started
            let touchPoint = recognizer.locationInView(self.view).x
            self.moveSlideMenu(touchPoint-self.slideMenuViewController.view.frame.width, animated: false)
            
        case .Ended, .Cancelled, .Failed: // Put the animation to a defined state
            switch self.slideState {
            case .Closing: // If the last known state was closing then close the menu
                self.moveSlideMenu(self.slideMenuViewController.view.frame.size.width * -1, animated: true)
            case .Opening: // If the last known state was opening then open the menu
                self.moveSlideMenu(0, animated: true)
            default:
                break
            }

        
        // Or did you even close/open?
        if point.x == 0 {
            print("\(NSDate()) open!")
            self.slideState = .Opened
            (self.slideMenuViewController as! FWSlideMenuViewController).progressFinished(.Opened)
        } else if point.x == -self.slideMenuViewController.view.frame.width {
            self.slideState = .Closed
            (self.slideMenuViewController as! FWSlideMenuViewController).progressFinished(.Closed)
        } else { // We're in animation
            print(point.x)
            (self.slideMenuViewController as! FWSlideMenuViewController).progressChanged((currentProgress - 0.9) / 0.1) // convert our currentProgress to interval [0,1]
        }
        
        // Animate the slideMenuView
        self.slideMenuViewController.view.frame.origin = point
      
        
        // Animate all the rest
        self.animateActiveChild(currentProgress)
    }
    
    private func animateActiveChild(progress: CGFloat) {
        
        // Get our transparentLayer.
        let transparentLayer = self.activeChild?.view.layer.sublayers!.filter({$0.name == self.transparentLayerKey})[0]
