 
                 headers:
                     'Authorization': 'Bearer ' + token
-            }
+            },
+            (err, res) ->
+                translatedMsg = 'Bing translation failed.'
+                if not err
+                    console.log('Bing translate API response:')
+                    console.log(JSON.stringify(res, null, 2))
+
+                    # Data format:
+                    #  {
+                    #  ...
+                    #  "content":
+                    #  '<string xmlns=
+                    #     "http://schemas.microsoft.com/2003/10/Serialization/">
+                    #      Versuch das mal.
+                    #  </string>'
+                    #  }
+                    try
+                        content = (new xmldom.DOMParser())
+                                        .parseFromString(res.content)
+                        translatedMsg = content.firstChild.firstChild.data
+                    catch except
+                        console.error(
+                            'Bing translation failed with exception:',
+                            except
+                        )
+
+                cb(err, translatedMsg)
         )
-
-        console.log('Bing translate API response:')
-        console.log(JSON.stringify(res, null, 2))
-
-        # Data format:
-        #  {
-        #  ...
-        #  "content":
-        #  '<string xmlns=
-        #      "http://schemas.microsoft.com/2003/10/Serialization/">
-        #      Versuch das mal.
-        #  </string>'
-        #  }
-        content = (new xmldom.DOMParser()).parseFromString(res.content)
-        content.firstChild.firstChild.data
     else
         console.error('Could not locate BingAccessTokenManager')
-        'No translate from Bing available'
+        cb(null, 'No translation from Bing available')
+
 
 _tryTranslation = (methodFunc, methodName, msg, sourceLang, targetLang, _id) ->
-    modifier = {}
-
-    try
-        translatedMsg = methodFunc(msg, sourceLang, targetLang)
-        modifier.translations =
-            createMessage(targetLang , translatedMsg, methodName, false)
+    cb = (error, translatedMsg) ->
+        modifier = {}
+        if not error
+            modifier.translations =
+                createMessage(
+                    targetLang,
+                    translatedMsg,
+                    methodName,
+                    false
+                )
+        else
+            console.error('Could not translate: ', error)
+            modifier.translations =
+                createMessage(
+                    targetLang,
+                    'Could not translate.',
+                    methodName,
+                    true
+                )
 
         ChanslateMessages.update({ _id: _id }, {
             $push: modifier
         })
 
-    catch error
-        console.error('Could not translate: ', error)
-        modifier.translations =
-            createMessage(
-                targetLang,
-                'Could not translate.',
-                methodName,
-                true
-            )
-
-        ChanslateMessages.update({ _id: _id }, {
-            $push: modifier
-        })
-
-
+    methodFunc(msg, sourceLang, targetLang, cb)
 
 ################################################################
 ### Exported methods and values
 ################################################################
 
 @translateAndPopulate = (msg, sourceLang, targetLang, _id) ->
-    # TODO (UU): These calls should be made in parallel
-    # But doing that for some reason blows the stack.
     _tryTranslation(
         translateUsingGoogle,
         'google',

    }


translateUsingGoogle = (text, source, target) ->
    check(text   , String)
    check(source , String)
    check(target , String)

                    q      : text
                headers:
                    'X-HTTP-Method-Override': 'GET'
            },
            (err, res) ->
                translatedMsg = 'Google translation failed.'
                if not err
                    console.log('Google translate API response:')
                    console.log(JSON.stringify(res, null, 2))
                    try
                        translatedMsg = res.data.data
                                           .translations[0].translatedText
                    catch exept
                        console.error(
                            'Google translation failed with exception:',
                            except
                        )

                cb(err, translatedMsg)
        )
    else
        console.error('Proper settings for Google API not provided!')
        cb(null, 'No translation from Google available')

translateUsingBing = (text, source, target, cb) ->

    check(text   , String)
    check(source , String)
