     public static func debounce(key: String, threshold: NSTimeInterval, atBegin: Bool = true, closure: ()->())
     {
         var canExecuteClosure = false
-        if let rateLimitInfo = self.rateLimitInfoForKey2(key) {
+        if let rateLimitInfo = self.debounceInfoForKey(key) {
             if let timer = rateLimitInfo.timer where timer.valid {
                 timer.invalidate()
                 let debounceInfo = DebounceInfo(key: key, threshold: threshold, atBegin: atBegin, closure: closure)
-                // TODO: use constant for "rateLimitInfo"
-                let timer = NSTimer.scheduledTimerWithTimeInterval(threshold, target: self, selector: #selector(RateLimit.throttleTimerFired2(_:)), userInfo: ["rateLimitInfo" : debounceInfo], repeats: false)
-                self.setRateLimitInfoForKey2(RateLimitInfo2(timer: timer, debounceInfo: debounceInfo), forKey: key)
+                let timer = NSTimer.scheduledTimerWithTimeInterval(threshold, target: self, selector: #selector(RateLimit.debounceTimerFired(_:)), userInfo: ["rateLimitInfo" : debounceInfo], repeats: false)
+                self.setDebounceInfoForKey(DebounceExecutionInfo(timer: timer, debounceInfo: debounceInfo), forKey: key)
 
             } else {
                 if (atBegin) {
                     canExecuteClosure = true
                 } else {
                     let debounceInfo = DebounceInfo(key: key, threshold: threshold, atBegin: atBegin, closure: closure)
-                    // TODO: use constant for "rateLimitInfo"
-                    let timer = NSTimer.scheduledTimerWithTimeInterval(threshold, target: self, selector: #selector(RateLimit.throttleTimerFired2(_:)), userInfo: ["rateLimitInfo" : debounceInfo], repeats: false)
-                    self.setRateLimitInfoForKey2(RateLimitInfo2(timer: timer, debounceInfo: debounceInfo), forKey: key)
+                    let timer = NSTimer.scheduledTimerWithTimeInterval(threshold, target: self, selector: #selector(RateLimit.debounceTimerFired(_:)), userInfo: ["rateLimitInfo" : debounceInfo], repeats: false)
+                    self.setDebounceInfoForKey(DebounceExecutionInfo(timer: timer, debounceInfo: debounceInfo), forKey: key)
                 }
             }
         } else {

        self.threshold = threshold
        self.atBegin = atBegin
        self.closure = closure
        super.init()
    }
}

/**
*    Provide debounce and throttle functionality.
*/
public class RateLimit
{
    // TODO: Rename queue with a generic name
    private static let debounceQueue = dispatch_queue_create("org.orru.RateLimit", DISPATCH_QUEUE_SERIAL)

    // TODO: merge rateLimitDictionary with rateLimitDictionary2
    private static var rateLimitDictionary = [String : RateLimitInfo]()
    private static var rateLimitDictionary2 = [String : RateLimitInfo2]()

    /**
    Throttle call to a closure using a given threshold


import Foundation

class ThrottleInfo {
    let key: String
    let threshold: NSTimeInterval
    let trailing: Bool
