     stats: (data, callback) ->
         @apiGet 'stats', data, callback
 
-    statsList: (callback, options = null) ->
+    statsList: (callback, options) ->
+        if options is undefined
+            options = null
         data = @_getOptions options
         data.stat = 'blast'
         @stats data, callback
 
-    statsBlast: (callback, options = null) ->
+    statsBlast: (callback, options) ->
+        if options is undefined
+            options = null
         data = @_getOptions options
         data.stat = 'blast'
         @stats data, callback

            revision: revisionId
        @apiGet 'template', data, callback

    saveTemplate: (template, callback, options = null) ->
        data = @_getOptions options
        data.template = template
        @apiPost 'template', data, callback

        req.end()
        req.write url.format({query: options.query}).replace('?', ''), 'utf8' if method is 'POST'

    _api_request: (uri, data, request_method, callback, binary_data_params) ->
        if binary_data_params is undefined
            binary_data_params = []
        return @_http_request uri, data, request_method, callback, binary_data_params

class SailthruClient
