Change factory to take NSDictionary instead of NSData to remove overheads for document updates