     }
     
     public func helperGetTransactionId(host: String, success: (String) -> (), failure: (NSError) -> ()) -> () {
-        var reqId = getRequestId() // requestId not validated for this call
+        _ = getRequestId() // requestId not validated for this call
 
-            manager.request(.GET, "\(host)/mobile-key").responseJSON{request, response, data, error in
-            if let errorMessage = error {
-                println("Networking.helperGetTransactionId most likely received malformed data from server.")
+            manager.request(.GET, "\(host)/mobile-key").responseJSON{ response in
+            if let errorMessage = response.result.error {
+                print("Networking.helperGetTransactionId most likely received malformed data from server.")
                 failure(errorMessage)
-            } else if let json: AnyObject = data {
+            } else if let json: AnyObject = response.data{
                 let transactionId = JSON(json)["id"].stringValue
                 
-                if count(transactionId) > 0
+                if transactionId.characters.count > 0
                 {
                     success(transactionId)
                 } else {

                return (mutableURLRequest, nil)
            }
            
            var reqId = getRequestId()
            manager.request(.POST, "\(self.mobileApiAddress!)/mobile/\(transactionId)/tokenize", parameters: payloadJson as? [String : AnyObject], encoding: .Custom(custom), headers: getSphHeaders(reqId)).responseJSON{(request, response, data, error) in

                if let errorMessage = error {
                    println("Networking.tokenize most likely received malformed data from server.")
                    failure(errorMessage)
                } else if let json: AnyObject = data {
                    let code = JSON(json)["result"]["code"].int
                    let message = JSON(json)["result"]["message"].stringValue
                    
                    if code == 100 && message == "OK" && self.doesContainValidRequestId(response, requestId: reqId)
                    {
                        success(self.resultStringTokenisationSuccess)
                    }

    }
    
    public func helperGetToken(host: String, transactionId: String, success: (String) -> (), failure: (NSError) -> ()) -> () {
        let reqId = getRequestId() // request id not validated for this call
        manager.request(.GET, "\(host)/tokenization/\(transactionId)", headers: getSphHeaders(reqId)).responseJSON{(response) in
            if let errorMessage = response.result.error {
                print("Networking.helperGetToken most likely received malformed data from server.")
                failure(errorMessage)
            } else if let dataMessage: AnyObject = response.data {
                if JSON(dataMessage)["token"].stringValue.characters.count > 0
                {
                    success(JSON(dataMessage).description)
                } else {
