Mri upload improvements

- ran phpcs
- made the _process function more consise by creating extra functions (i.e runBatchUpload)