 				@_from.cancel()
 				@_to.cancel()
 		cb(null, true)
-	
 )
-L.geoJson.pouch = (db, remoteDB, opts)->
-	new L.GeoJSON.Pouch(db, remoteDB, opts)+L.geoJson.pouch = (remoteDB, opts)->
+	new L.GeoJSON.Pouch(remoteDB, opts)
				if opts and opts.idbName
					db = opts.idbName
				else
					db = remoteDB.split("/").pop()
		else
			if opts and opts.idbName
				db = opts.idbName
			else
				db = location.href.split("/").pop()
		@_layers = {}
		pouchParams = L.Util.extend({}, @defaultParams)
		for i of opts

						true			
				)
				if remoteDB
						@remoteDB = remoteDB
						@sync = (cb) ->
							options = continuous : @pouchParams.continuous
							switch @pouchParams.direction
								when "from" then @_from = Pouch.replicate @localDB, @remoteDB, options
								when "to" then @_to = Pouch.replicate @remoteDB, @localDB,  options
								when "both"
									@_from = Pouch.replicate @localDB, @remoteDB, options
									@_to = Pouch.replicate @remoteDB, @localDB,  options
								else noOpt = true
							if cb
								cb(null, true) unless noOpt
								cb("No Option") if noOpt
						@sync()
			else if remoteDB
				Pouch remoteDB, (e3, db3) =>
					unless e3
