           response: response
         )
 
-      callback err, JSON.parse(response)  if callback
+      callback?(err, JSON.parse(response))
       return
 
-    return @
+    return this
 
   _is_post_api: (method) ->
-    return true  if method is "files.upload"
-
+    method is "files.upload"
 
 module.exports = Slack

        response: response
      }

  api: (method, options, callback) =>

    if typeof options is "function"
      callback = options
      options = {}

    options = options or {}
    
    options.token = @token
    
    url = @url + method
    
    request_arg = url: @url + method
    
    if @_is_post_api(method)
      request_arg.method = "POST"
      request_arg.form = options
    else
      request_arg.method = "GET"
      request_arg.qs = options
    
    request request_arg, (err, body, response) ->
      if err
        return callback(err,

      username: options.username
      attachments: options.attachments

    payload[emoji.key] = emoji.val

    request.post
      url: @webhookUrl
