 
         # TODO: This will only return the latest 1 MB of results, so if there
         # are more keys additional requests must be made.
-        db.query(request, callback)
-
-      list_operations: (callback) ->
+        db.query(request, cb)
+
+      list_operations: (cb) ->
         request =
           TableName: operations_table
           HashKeyValue: { S: docName }

            db.deleteItem(request, cb)
          (error)->
            if error?
              callback(error, null)
            else
              callback(null, true)
          )
      ]
    (error, result) ->

  # deleted and the error message if something went wrong.
  @delete = (docName, dbMeta, callback) ->
    async.auto(
      list_snapshots: (cb) ->
        request =
          TableName: snapshots_table
          HashKeyValue: { S: docName }
