             topVC.presentViewController(CV.debugVC, animated: true, completion: nil)
         }
     }
+    
+    
+    
+    
+    
+// MARK: setter functions
+    
+    public class func setWindow(window :UIWindow) {
+        if (!CV.isSetup) {
+            Pesticide.setup()
+        }
+        CV.window = window
+    }
+    
+    public class func setDelegate(delegate :PesticideDelegate?) {
+        CV.delegate = delegate
+    }
 
-    // MARK: private functions
+    
+    
+    
+    
+// MARK: private functions
     
     private class func setup() {
         Pesticide.startLogging()

        static var commands = Dictionary<String, Array<String> -> ()>()
        static var window = UIWindow()
        static var isSetup = false
    }

    public class func log(message: String) {

        return CV.debugVC
    }
    
    public class func toggle() {
        var topVC :UIViewController = topViewController(CV.window.rootViewController!)
        if (topVC.isKindOfClass(DebugTableController)) {
