     public var ref: DatabaseReference
     public var parameters: JSONObject
     
-    public init(ref: DatabaseReference, parameters: JSONObject) {
+    public init(at ref: DatabaseReference, parameters: JSONObject) {
         self.ref = ref
         self.parameters = parameters
     }

    }
    
}

    }
    
    public func createObject<T: State>(at ref: DatabaseReference, createNewChildId: Bool, removeId: Bool, parameters: JSONObject, core: Core<T>) {
        core.fire(command: CreateObject(at: ref, createNewChildId: createNewChildId, removeId: removeId, parameters: parameters))
    }
    
    public func updateObject<T: State>(at ref: DatabaseReference, parameters: JSONObject, core: Core<T>) {
        core.fire(command: UpdateObject(at: ref, parameters: parameters))
    }

    func updateObjectDirectly<T: State>(at ref: DatabaseReference, parameters: JSONObject, core: Core<T>) {
        core.fire(command: UpdateObjectDirectly(at: ref, parameters: parameters))
    }
    
    func removeObject<T: State>(at ref: DatabaseReference, core: Core<T>) {
        core.fire(command: RemoveObject(at: ref))
    }
    
    func getObject<T: State>(at objectRef: DatabaseReference, core: Core<T>, completion: @escaping (_ objectJSON: JSONObject?) -> Void) {
        core.fire(command: GetObject(at: objectRef, completion: completion))
    }
    
    func observeObject<T: State>(at objectRef: DatabaseReference, core: Core<T>, _ completion: @escaping (_ objectJSON: JSONObject?) -> Void) {
        core.fire(command: ObserveObject(at: objectRef, completion: completion))
    }
    
    func stopObservingObject<T: State>(at objectRef: DatabaseReference, core: Core<T>) {
        core.fire(command: StopObservingObject(at: objectRef))
    }
    
    func search<T: State>(with baseQuery: DatabaseQuery, key: String, value: String, core: Core<T>, completion: @escaping (_ json: JSONObject?) -> Void) {
        core.fire(command: Search(with: baseQuery, key: key, value: value, completion: completion))
    }
    
    func monitorConnection<T: State>(core: Core<T>) {
        core.fire(command: MonitorConnection(rootRef: ref))
    }
    
    func stopMonitoringConnection<T: State>(core: Core<T>) {
        core.fire(command: StopMonitorConnection(rootRef: ref))
    }
    
    func upload<T: State>(_ data: Data, contentType: String, to storageRef: StorageReference, core: Core<T>, completion: @escaping (String?, URL?, Error?) -> Void) {
        core.fire(command: UploadData(data, contentType: contentType, to: storageRef, completion: completion))
    }
    
    func upload<T: State>(from url: URL, to storageRef: StorageReference, core: Core<T>, completion: @escaping (String?, URL?, Error?) -> Void) {
     core.fire(command: UploadURL(url, to: storageRef, completion: completion))
    }
    
    func delete<T: State>(at storageRef: StorageReference, core: Core<T>, completion: @escaping (Error?) -> Void) {
        core.fire(command: DeleteStorage(at: storageRef, completion: completion))
    }
    
}

