         delete doc._id
         delete doc._rev
       console.log method, doc
-      (if remoteAndLocal
-        localDb[method](doc)
-      else
-        remoteDb[method](doc)
-      )
+      remoteDb[method](doc)
       .then (result) =>
         deferred.resolve(result)
       .catch (err) =>

      _funcName = _indent + "query"
      console.log _funcName, fun, options
      deferred = $q.defer()
      localDeferred = $q.defer()
      otherOneFailed = false
      localDb.query fun, options, (err, result) =>
        if result.rows.length == 0
          if otherOneFailed
            deferred.resolve []
          otherOneFailed = true
        else
          deferred.resolve (doc.value for doc in result.rows)
      remoteDb.query fun, options, (err, result) =>
        if result.rows.length == 0
          if otherOneFailed
            deferred.resolve []
          otherOneFailed = true
        else
          deferred.resolve (doc.value for doc in result.rows)
      return deferred.promise

    saveLocal: (doc) ->
      _funcName = _indent + "storage.saveLocal"
      console.log _funcName
      @_save doc

    saveRemoteOnly: (doc) ->
      _funcName = _indent + "storage.saveRemoteOnly"
      console.log _funcName
      @_save doc

    save: (doc) ->
      @_save(doc)

    del: (doc) ->
      deletedDoc = {_id: doc._id, _rev: doc._rev, _deleted: true}
      @save(deletedDoc)

    queryRemote: (fun, options) ->
      deferred = $q.defer()
