I do not fully understand this comment and especially why we have something related to variant.json...

What about refactoring `downloadApp` to accept a `metadata` object that would have all `necessaryFields` attributes (and may be other)?
So that, in processAppDownload, you would do something like this
```
let metadata = {
  id: appId,
  manifestURL: metadata.manifestURL, 
  orifin: metadata.origin,
  installOrigin: metadata.installOrigin
};
downloadApp(json, appPath.path, metadata, function() {
  ...
});
```