 	func getRateLimitFromServer(apiServer: ApiServer, callback: (Int64, Int64, Int64)->Void)
 	{
 		get("/rate_limit", fromServer: apiServer, ignoreLastSync: true, parameters: nil, extraHeaders: nil,
-			success: { response, data in
-				let allHeaders = response!.allHeaderFields
-				let requestsRemaining = (allHeaders["X-RateLimit-Remaining"] as! NSString).longLongValue
-				let requestLimit = (allHeaders["X-RateLimit-Limit"] as! NSString).longLongValue
-				let epochSeconds = (allHeaders["X-RateLimit-Reset"] as! NSString).longLongValue
-				callback(requestsRemaining, requestLimit, epochSeconds)
-			},
-			failure: { response, data, error in
-				if response?.statusCode == 404 && data != nil && !((data as! NSDictionary).ofk("message") as! String == "Not Found") {
-					callback(10000, 10000, 0)
+			completion: { response, data, error in
+
+				if error == nil {
+					let allHeaders = response!.allHeaderFields
+					let requestsRemaining = (allHeaders["X-RateLimit-Remaining"] as! NSString).longLongValue
+					let requestLimit = (allHeaders["X-RateLimit-Limit"] as! NSString).longLongValue
+					let epochSeconds = (allHeaders["X-RateLimit-Reset"] as! NSString).longLongValue
+					callback(requestsRemaining, requestLimit, epochSeconds)
 				} else {
-					callback(-1, -1, -1)
+					if response?.statusCode == 404 && data != nil && !((data as! NSDictionary).ofk("message") as! String == "Not Found") {
+						callback(10000, 10000, 0)
+					} else {
+						callback(-1, -1, -1)
+					}
 				}
 		})
 	}

		callback:(data: AnyObject?, lastPage: Bool, resultCode: Int, etag: String?) -> Void) {

			get(path, fromServer: fromServer, ignoreLastSync: false, parameters: parameters, extraHeaders: extraHeaders,
				success: { [weak self] response, data in

					let allHeaders = response!.allHeaderFields
					fromServer.requestsRemaining = NSNumber(longLong: (allHeaders["X-RateLimit-Remaining"] as! NSString).longLongValue)
					fromServer.requestsLimit = NSNumber(longLong: (allHeaders["X-RateLimit-Limit"] as! NSString).longLongValue)
					let epochSeconds = (allHeaders["X-RateLimit-Reset"] as! NSString).doubleValue
					fromServer.resetDate = NSDate(timeIntervalSince1970: epochSeconds)
					NSNotificationCenter.defaultCenter().postNotificationName(API_USAGE_UPDATE, object: fromServer, userInfo: nil)

					let etag = allHeaders["Etag"] as? String
					let code = response!.statusCode ?? 0
					callback(data: data, lastPage: self!.lastPage(response!), resultCode: code, etag: etag)

				}, failure: { response, data, error in
					let code = response?.statusCode ?? 0
					if code != 304 {
						DLog("(%@) Failure for %@: %@", fromServer.label, path, error?.localizedDescription)
					}
					callback(data: nil, lastPage: false, resultCode: code, etag: nil)
			})
	}

	private func get(

				for d in data ?? [] {
					let eventDate = syncDateFormatter.dateFromString(d.ofk("created_at") as! String)!
					if latestDate.compare(eventDate) == NSComparisonResult.OrderedAscending { // this is where we came in
						if let repoId = d["repo"]?["id"] as? NSNumber {
							DLog("New event at %@ from Repo ID %@", eventDate, repoId)
							repoIdsToMarkDirty.insert(repoId)
						}
						if latestDate.compare(eventDate) == NSComparisonResult.OrderedAscending {
