      */
     private func runDelegateProtocolFunction(printString: String, results: [String: AnyObject]!, url: String) {
         print(printString)
-        dispatch_async(dispatch_get_main_queue(), {
-            self.delegate.didReceiveAPIResults(results, url: url)
-        })
-    }
-}
-
-
+        DispatchQueue.main.async {self.delegate.didReceiveAPIResults(results: results, url: url) }
+    }
+}
+
+

    func restCall(params : [String: AnyObject], url : String, method: HTTPMethod = HTTPMethod.post, contentType: ContentType = ContentType.json, isSuccess: String? = nil) {
        
        //Checks to see if the URL string is valid
        guard let tempURL = NSURL(string: url) else {
            self.runDelegateProtocolFunction("Error: could not create URL from string", error: "", url: url)
            return
        }
        //Creates the session and request
        let session = NSURLSession(configuration: NSURLSessionConfiguration.defaultSessionConfiguration())
        let request: NSMutableURLRequest = NSMutableURLRequest(URL: tempURL)
        request.HTTPMethod = method.rawValue
        
        do {
            //TODO: Add GET protocols
            switch contentType {
            case .json:
                //Converts the params object to JSON in the HTTP request
                let jsonPost = try NSJSONSerialization.dataWithJSONObject(params, options: NSJSONWritingOptions.PrettyPrinted)
                request.HTTPBody = jsonPost
                request.addValue(ContentType.json.rawValue , forHTTPHeaderField: ContentType.headerFieldValue)
            case .urlEncode:
                //Convert the Dictionary to a String

     */
    private func runDelegateProtocolFunction(printString: String, error: String, url: String) {
        print(printString)
        DispatchQueue.main.async{ self.delegate.didNotReceiveAPIResults(error: error, url: url) }
    }
    
    /**
