Repository: PennLINC/CuBIDS (language: python)

Issue:
Use black and isort to autoformat the main package
Closes none.

Changes proposed:

- Add a job to check the code style automatically.
- Run black and isort to reformat the code.
- Manually address any remaining style issues in the core code (not examples or tests).


Discussion / hints:

Fix patch:
diff --git a/.circleci/config.yml b/.circleci/config.yml
index bde4a4bb3..b51a9a08b 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -68,7 +68,7 @@ jobs:
 
   deploy_pypi:
     machine:
-      image: circleci/classic:201711-01
+      image: ubuntu-2004:202201-02
     working_directory: /tmp/src/CuBIDS
     steps:
       - checkout:
diff --git a/BIDS_Dataset/README b/BIDS_Dataset/README
deleted file mode 100644
index f96d811a8..000000000
--- a/BIDS_Dataset/README
+++ /dev/null
@@ -1,10 +0,0 @@
-Heavily downsampled CS-DSI testing datasets
-
-This data has had some parameters changed so that there are different
-parameter groups in the same key groups.
-
-## Changes
-
- - sub-01_ses-phdiff_acq-HASC55AP_dwi: EchoTime set to 0.04 from 0.089
- - sub-02_ses-phdiff_task-rest_bold: Fieldmap has been removed
- - sub-03_ses-phdiff_task-rest_bold: FlipAngle set to 70 from 90
diff --git a/BIDS_Dataset/dataset_description.json b/BIDS_Dataset/dataset_description.json
deleted file mode 100644
index 9ee88dbcc..000000000
--- a/BIDS_Dataset/dataset_description.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-    "BIDSVersion": "1.0.0",
-    "License": "BSD 3-clause",
-    "Name": "Heavily downsampled CS-DSI simulated data",
-    "ReferencesAndLinks": [],
-    "Authors": ["PennLINC", "PennBBL"]
-}
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json b/BIDS_Dataset/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json
deleted file mode 100644
index b8005d8af..000000000
--- a/BIDS_Dataset/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "DeviceSerialNumber": "167024",
-    "SoftwareVersions": "syngo_MR_E11",
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "ScanningSequence": "GR_IR",
-    "SequenceVariant": "SK_SP_MP",
-    "SeriesDescription": "ABCD_T1w_MPR_vNav",
-    "BodyPartExamined": "BRAIN",
-    "ProtocolName": "ABCD_T1w_MPR_vNav",
-    "PatientName": "John Doe",
-    "SequenceName": "tfl3d1_16ns",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND",
-        "NORM"
-    ],
-    "AcquisitionTime": "16:15:31.770000",
-    "MagneticFieldStrength": 3,
-    "FlipAngle": 8,
-    "EchoTime": 0.0029,
-    "RepetitionTime": 2.5,
-    "InversionTime": 1.07,
-    "PhaseEncodingLines": 256,
-    "PhaseEncodingDirection": "i-",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0"
-}
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz b/BIDS_Dataset/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz
deleted file mode 100644
index 5dd2f5e70..000000000
Binary files a/BIDS_Dataset/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval b/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval
deleted file mode 100644
index b0e700029..000000000
--- a/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval
+++ /dev/null
@@ -1,1 +0,0 @@
-0 0 2000 3780 3800 4380 2195 2205 4200 3570
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec b/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec
deleted file mode 100644
index 14ebd3001..000000000
--- a/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec
+++ /dev/null
@@ -1,3 +0,0 @@
-0 0 0.947306 -0.689491 -0.687391 -0.640236 0.904801 0.301134 0.218033 0.236237
-0 0 -0.320301 -0.233031 0.690471 -0.429664 -0.305819 -0.906545 0.874886 0.239537
-0 0 -0.00426696 -0.685783 -0.225265 -0.636779 -0.296327 -0.295796 -0.432477 -0.941708
\ No newline at end of file
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json b/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json
deleted file mode 100644
index f6cf3ab19..000000000
--- a/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "TotalReadoutTime": 0.0717598,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 4.2,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "FlipAngle": 90,
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "SeriesDescription": "ABCD_dMRI",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.11666666666666667,
-        0.23333333333333334,
-        0.35,
-        0.4666666666666667,
-        0.5833333333333334,
-        0.7,
-        0.8166666666666667,
-        0.9333333333333333,
-        1.05,
-        1.1666666666666667,
-        1.2833333333333334,
-        1.4,
-        1.5166666666666666,
-        1.6333333333333333,
-        1.75,
-        1.8666666666666667,
-        1.9833333333333334,
-        2.1,
-        2.216666666666667,
-        2.3333333333333335,
-        2.45,
-        2.566666666666667,
-        2.6833333333333336,
-        2.8,
-        2.9166666666666665,
-        3.033333333333333,
-        3.15,
-        3.2666666666666666,
-        3.3833333333333333,
-        3.5,
-        3.6166666666666667,
-        3.7333333333333334,
-        3.85,
-        3.966666666666667,
-        4.083333333333333
-    ],
-    "PhaseEncodingDirection": "j",
-    "SoftwareVersions": "syngo_MR_E11"
-}
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz b/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz
deleted file mode 100644
index 78b43ef68..000000000
Binary files a/BIDS_Dataset/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json b/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json
deleted file mode 100644
index 179945b6b..000000000
--- a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoTime": 0.004,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "InstitutionName": "HUP6",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 7,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz b/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz
deleted file mode 100644
index 8a7f44f4d..000000000
Binary files a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json b/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json
deleted file mode 100644
index 370334c18..000000000
--- a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoNumber": 2,
-    "EchoTime": 0.00646,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "InstitutionName": "HUP6",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 7,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz b/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz
deleted file mode 100644
index 4a99378f3..000000000
Binary files a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json b/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json
deleted file mode 100644
index 849f6a3b3..000000000
--- a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-    "IntendedFor": [
-        "ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz"
-    ],
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoNumber": 2,
-    "EchoTime1": 0.004,
-    "EchoTime2": 0.00646,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "P",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 8,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz b/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz
deleted file mode 100644
index daf5e956e..000000000
Binary files a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json b/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json
deleted file mode 100644
index 6fd8eefc8..000000000
--- a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "TotalReadoutTime": 0.0717598,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 4.2,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "FlipAngle": 90,
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "SeriesDescription": "ABCD_dMRI",
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.11666666666666667,
-        0.23333333333333334,
-        0.35,
-        0.4666666666666667,
-        0.5833333333333334,
-        0.7,
-        0.8166666666666667,
-        0.9333333333333333,
-        1.05,
-        1.1666666666666667,
-        1.2833333333333334,
-        1.4,
-        1.5166666666666666,
-        1.6333333333333333,
-        1.75,
-        1.8666666666666667,
-        1.9833333333333334,
-        2.1,
-        2.216666666666667,
-        2.3333333333333335,
-        2.45,
-        2.566666666666667,
-        2.6833333333333336,
-        2.8,
-        2.9166666666666665,
-        3.033333333333333,
-        3.15,
-        3.2666666666666666,
-        3.3833333333333333,
-        3.5,
-        3.6166666666666667,
-        3.7333333333333334,
-        3.85,
-        3.966666666666667,
-        4.083333333333333
-    ],
-    "PhaseEncodingDirection": "j-",
-    "SoftwareVersions": "syngo_MR_E11",
-    "IntendedFor": [
-        "ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz"
-    ]
-}
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz b/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz
deleted file mode 100644
index b60186d5a..000000000
Binary files a/BIDS_Dataset/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json b/BIDS_Dataset/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json
deleted file mode 100644
index 008c2809b..000000000
--- a/BIDS_Dataset/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "TotalReadoutTime": 0.0717598,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "PatientName": "John Doe",
-    "TaskName": "rest",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 1.0,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "FlipAngle": 90,
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "SeriesDescription": "ABCD_dMRI",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.027131782945736437,
-        0.054263565891472874,
-        0.0813953488372093,
-        0.10852713178294575,
-        0.1356589147286822,
-        0.1627906976744186,
-        0.18992248062015504,
-        0.2170542635658915,
-        0.24418604651162792,
-        0.2713178294573644,
-        0.2984496124031008,
-        0.3255813953488372,
-        0.35271317829457366,
-        0.3798449612403101,
-        0.4069767441860465,
-        0.434108527131783,
-        0.4612403100775194,
-        0.48837209302325585,
-        0.5155038759689923,
-        0.5426356589147288,
-        0.5697674418604651,
-        0.5968992248062016,
-        0.6240310077519381,
-        0.6511627906976744,
-        0.6782945736434108,
-        0.7054263565891473,
-        0.7325581395348837,
-        0.7596899224806202,
-        0.7868217054263567,
-        0.813953488372093,
-        0.8410852713178295,
-        0.868217054263566,
-        0.8953488372093024,
-        0.9224806201550388,
-        0.9496124031007752
-    ],
-    "PhaseEncodingDirection": "j",
-    "SoftwareVersions": "syngo_MR_E11"
-}
diff --git a/BIDS_Dataset/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz b/BIDS_Dataset/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz
deleted file mode 100644
index af8d3e5ac..000000000
Binary files a/BIDS_Dataset/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json b/BIDS_Dataset/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json
deleted file mode 100644
index c9dff6bf0..000000000
--- a/BIDS_Dataset/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "DeviceSerialNumber": "167024",
-    "SoftwareVersions": "syngo_MR_E11",
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "ScanningSequence": "GR_IR",
-    "SequenceVariant": "SK_SP_MP",
-    "SeriesDescription": "ABCD_T1w_MPR_vNav",
-    "BodyPartExamined": "BRAIN",
-    "ProtocolName": "ABCD_T1w_MPR_vNav",
-    "SequenceName": "tfl3d1_16ns",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND",
-        "NORM"
-    ],
-    "AcquisitionTime": "16:15:31.770000",
-    "MagneticFieldStrength": 3,
-    "FlipAngle": 8,
-    "EchoTime": 0.0029,
-    "RepetitionTime": 2.5,
-    "InversionTime": 1.07,
-    "PhaseEncodingLines": 256,
-    "PhaseEncodingDirection": "i-",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0"
-}
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz b/BIDS_Dataset/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz
deleted file mode 100644
index 5dd2f5e70..000000000
Binary files a/BIDS_Dataset/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval b/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval
deleted file mode 100644
index 551603c53..000000000
--- a/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval
+++ /dev/null
@@ -1,1 +0,0 @@
-0 0 2000 3780 3800 4380 2195 2205 4200 3570 1005 2800 3790 3390 0 3605 3980 2575 3605 4195 3570 4175 3385 3395 4185 2395 4985 0 1800 1800 3780 1610 4000 4170 1190 2785 3215 200 1985 3980 0 3385 4385 4955 395 3975 3390 3965 3395 205 3385 4385 5015 990 1800 1010 1190 2605 2195 4380 0 
\ No newline at end of file
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec b/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec
deleted file mode 100644
index d31e09213..000000000
--- a/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec
+++ /dev/null
@@ -1,3 +0,0 @@
-0 0 0.947306 -0.689491 -0.687391 -0.640236 0.904801 0.301134 0.218033 0.236237 -0.00045876 -0.267232 -0.229644 0.727918 0 -0.235344 -0.895859 0.556585 -0.235344 -0.872345 0.236237 0.218536 -0.485657 -0.969313 0.873651 0.577663 0.999993 0 -0.665829 0.665829 -0.689491 0.704677 -0.00022427 -0.437403 0.409502 0.26769 -0.00031134 0.999772 -0.00016233 0.895859 0 0.971029 0.426584 0 -0.712479 -0.00011346 -0.727918 -0.448521 -0.484877 -0.00487633 -0.485657 -0.426584 -0.00019956 -0.00045946 0.665829 -0.445079 0.409502 -0.830354 -0.904801 0.640236 0 
-0 0 -0.320301 -0.233031 0.690471 -0.429664 -0.305819 -0.906545 0.874886 0.239537 0.898412 0.804939 0.691594 0.488404 0 -0.943991 -0.00303821 -0.00388069 0.943991 -0.439269 -0.239537 0.439998 0.488955 -0.245811 0.221429 -0.581525 -0.00280889 0 0.670455 -0.670455 0.233031 -0.709514 -0.896432 0.221712 -0.414997 -0.538836 -0.999995 -0.0151408 0.32154 -0.00303821 0 -0.00329842 0.642719 -0.00262411 -0.0090312 -0.450857 0.488404 -0.00293403 -0.730564 -0.999882 -0.488955 -0.642719 -0.999997 -0.454441 0.670455 -0.895473 0.414997 -0.557225 -0.305819 -0.429664 0 
-0 0 -0.00426696 -0.685783 -0.225265 -0.636779 -0.296327 -0.295796 -0.432477 -0.941708 -0.439154 -0.529773 -0.684807 -0.481245 0 -0.231289 -0.444328 -0.830781 -0.231289 -0.214611 -0.941708 -0.871001 -0.724611 -0.00307126 -0.433248 -0.57283 -0.00260781 0 -0.327355 -0.327355 -0.685783 -0.00439859 -0.443181 -0.871506 -0.812457 -0.798748 -0.00311231 -0.0150655 -0.946896 -0.444328 0 -0.238939 -0.636348 -0.999997 -0.701635 -0.892596 -0.481245 -0.893768 -0.480802 -0.014558 -0.724611 -0.636348 -0.00259323 -0.890777 -0.327355 -0.00576167 -0.812457 -0.00362001 -0.296327 -0.636779 0 
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json b/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json
deleted file mode 100644
index 93b5ceb5f..000000000
--- a/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "FlipAngle": 90,
-    "TotalReadoutTime": 0.0717598,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 4.2,
-    "PatientName": "Jane Doe", 
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "SeriesDescription": "ABCD_dMRI",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.07,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.11666666666666667,
-        0.23333333333333334,
-        0.35,
-        0.4666666666666667,
-        0.5833333333333334,
-        0.7,
-        0.8166666666666667,
-        0.9333333333333333,
-        1.05,
-        1.1666666666666667,
-        1.2833333333333334,
-        1.4,
-        1.5166666666666666,
-        1.6333333333333333,
-        1.75,
-        1.8666666666666667,
-        1.9833333333333334,
-        2.1,
-        2.216666666666667,
-        2.3333333333333335,
-        2.45,
-        2.566666666666667,
-        2.6833333333333336,
-        2.8,
-        2.9166666666666665,
-        3.033333333333333,
-        3.15,
-        3.2666666666666666,
-        3.3833333333333333,
-        3.5,
-        3.6166666666666667,
-        3.7333333333333334,
-        3.85,
-        3.966666666666667,
-        4.083333333333333
-    ],
-    "PhaseEncodingDirection": "j",
-    "SoftwareVersions": "syngo_MR_E11"
-}
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz b/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz
deleted file mode 100644
index af8d3e5ac..000000000
Binary files a/BIDS_Dataset/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json b/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json
deleted file mode 100644
index 179945b6b..000000000
--- a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoTime": 0.004,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "InstitutionName": "HUP6",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 7,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz b/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz
deleted file mode 100644
index 8a7f44f4d..000000000
Binary files a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json b/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json
deleted file mode 100644
index 370334c18..000000000
--- a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoNumber": 2,
-    "EchoTime": 0.00646,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "InstitutionName": "HUP6",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 7,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz b/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz
deleted file mode 100644
index 4a99378f3..000000000
Binary files a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json b/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json
deleted file mode 100644
index eae959b1d..000000000
--- a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-    "IntendedFor": [
-        "ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz"
-    ],
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoNumber": 2,
-    "EchoTime1": 0.004,
-    "EchoTime2": 0.00646,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "P",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 8,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz b/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz
deleted file mode 100644
index daf5e956e..000000000
Binary files a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json b/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json
deleted file mode 100644
index 9ea6b9b98..000000000
--- a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "TotalReadoutTime": 0.0717598,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 4.2,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "FlipAngle": 90,
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "SeriesDescription": "ABCD_dMRI",
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.11666666666666667,
-        0.23333333333333334,
-        0.35,
-        0.4666666666666667,
-        0.5833333333333334,
-        0.7,
-        0.8166666666666667,
-        0.9333333333333333,
-        1.05,
-        1.1666666666666667,
-        1.2833333333333334,
-        1.4,
-        1.5166666666666666,
-        1.6333333333333333,
-        1.75,
-        1.8666666666666667,
-        1.9833333333333334,
-        2.1,
-        2.216666666666667,
-        2.3333333333333335,
-        2.45,
-        2.566666666666667,
-        2.6833333333333336,
-        2.8,
-        2.9166666666666665,
-        3.033333333333333,
-        3.15,
-        3.2666666666666666,
-        3.3833333333333333,
-        3.5,
-        3.6166666666666667,
-        3.7333333333333334,
-        3.85,
-        3.966666666666667,
-        4.083333333333333
-    ],
-    "PhaseEncodingDirection": "j-",
-    "SoftwareVersions": "syngo_MR_E11"
-}
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz b/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz
deleted file mode 100644
index b60186d5a..000000000
Binary files a/BIDS_Dataset/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json b/BIDS_Dataset/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json
deleted file mode 100644
index 7376e8731..000000000
--- a/BIDS_Dataset/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "TotalReadoutTime": 0.0717598,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "TaskName": "rest",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 1.0,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "SeriesDescription": "ABCD_dMRI",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "FlipAngle": 90,
-    "SliceTiming": [
-        0.0,
-        0.027131782945736437,
-        0.054263565891472874,
-        0.0813953488372093,
-        0.10852713178294575,
-        0.1356589147286822,
-        0.1627906976744186,
-        0.18992248062015504,
-        0.2170542635658915,
-        0.24418604651162792,
-        0.2713178294573644,
-        0.2984496124031008,
-        0.3255813953488372,
-        0.35271317829457366,
-        0.3798449612403101,
-        0.4069767441860465,
-        0.434108527131783,
-        0.4612403100775194,
-        0.48837209302325585,
-        0.5155038759689923,
-        0.5426356589147288,
-        0.5697674418604651,
-        0.5968992248062016,
-        0.6240310077519381,
-        0.6511627906976744,
-        0.6782945736434108,
-        0.7054263565891473,
-        0.7325581395348837,
-        0.7596899224806202,
-        0.7868217054263567,
-        0.813953488372093,
-        0.8410852713178295,
-        0.868217054263566,
-        0.8953488372093024,
-        0.9224806201550388,
-        0.9496124031007752
-    ],
-    "SoftwareVersions": "syngo_MR_E11"
-}
diff --git a/BIDS_Dataset/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz b/BIDS_Dataset/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz
deleted file mode 100644
index af8d3e5ac..000000000
Binary files a/BIDS_Dataset/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json b/BIDS_Dataset/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json
deleted file mode 100644
index c9dff6bf0..000000000
--- a/BIDS_Dataset/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "DeviceSerialNumber": "167024",
-    "SoftwareVersions": "syngo_MR_E11",
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "ScanningSequence": "GR_IR",
-    "SequenceVariant": "SK_SP_MP",
-    "SeriesDescription": "ABCD_T1w_MPR_vNav",
-    "BodyPartExamined": "BRAIN",
-    "ProtocolName": "ABCD_T1w_MPR_vNav",
-    "SequenceName": "tfl3d1_16ns",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND",
-        "NORM"
-    ],
-    "AcquisitionTime": "16:15:31.770000",
-    "MagneticFieldStrength": 3,
-    "FlipAngle": 8,
-    "EchoTime": 0.0029,
-    "RepetitionTime": 2.5,
-    "InversionTime": 1.07,
-    "PhaseEncodingLines": 256,
-    "PhaseEncodingDirection": "i-",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0"
-}
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz b/BIDS_Dataset/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz
deleted file mode 100644
index 5dd2f5e70..000000000
Binary files a/BIDS_Dataset/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval b/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval
deleted file mode 100644
index 551603c53..000000000
--- a/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval
+++ /dev/null
@@ -1,1 +0,0 @@
-0 0 2000 3780 3800 4380 2195 2205 4200 3570 1005 2800 3790 3390 0 3605 3980 2575 3605 4195 3570 4175 3385 3395 4185 2395 4985 0 1800 1800 3780 1610 4000 4170 1190 2785 3215 200 1985 3980 0 3385 4385 4955 395 3975 3390 3965 3395 205 3385 4385 5015 990 1800 1010 1190 2605 2195 4380 0 
\ No newline at end of file
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec b/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec
deleted file mode 100644
index d31e09213..000000000
--- a/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec
+++ /dev/null
@@ -1,3 +0,0 @@
-0 0 0.947306 -0.689491 -0.687391 -0.640236 0.904801 0.301134 0.218033 0.236237 -0.00045876 -0.267232 -0.229644 0.727918 0 -0.235344 -0.895859 0.556585 -0.235344 -0.872345 0.236237 0.218536 -0.485657 -0.969313 0.873651 0.577663 0.999993 0 -0.665829 0.665829 -0.689491 0.704677 -0.00022427 -0.437403 0.409502 0.26769 -0.00031134 0.999772 -0.00016233 0.895859 0 0.971029 0.426584 0 -0.712479 -0.00011346 -0.727918 -0.448521 -0.484877 -0.00487633 -0.485657 -0.426584 -0.00019956 -0.00045946 0.665829 -0.445079 0.409502 -0.830354 -0.904801 0.640236 0 
-0 0 -0.320301 -0.233031 0.690471 -0.429664 -0.305819 -0.906545 0.874886 0.239537 0.898412 0.804939 0.691594 0.488404 0 -0.943991 -0.00303821 -0.00388069 0.943991 -0.439269 -0.239537 0.439998 0.488955 -0.245811 0.221429 -0.581525 -0.00280889 0 0.670455 -0.670455 0.233031 -0.709514 -0.896432 0.221712 -0.414997 -0.538836 -0.999995 -0.0151408 0.32154 -0.00303821 0 -0.00329842 0.642719 -0.00262411 -0.0090312 -0.450857 0.488404 -0.00293403 -0.730564 -0.999882 -0.488955 -0.642719 -0.999997 -0.454441 0.670455 -0.895473 0.414997 -0.557225 -0.305819 -0.429664 0 
-0 0 -0.00426696 -0.685783 -0.225265 -0.636779 -0.296327 -0.295796 -0.432477 -0.941708 -0.439154 -0.529773 -0.684807 -0.481245 0 -0.231289 -0.444328 -0.830781 -0.231289 -0.214611 -0.941708 -0.871001 -0.724611 -0.00307126 -0.433248 -0.57283 -0.00260781 0 -0.327355 -0.327355 -0.685783 -0.00439859 -0.443181 -0.871506 -0.812457 -0.798748 -0.00311231 -0.0150655 -0.946896 -0.444328 0 -0.238939 -0.636348 -0.999997 -0.701635 -0.892596 -0.481245 -0.893768 -0.480802 -0.014558 -0.724611 -0.636348 -0.00259323 -0.890777 -0.327355 -0.00576167 -0.812457 -0.00362001 -0.296327 -0.636779 0 
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json b/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json
deleted file mode 100644
index a80710114..000000000
--- a/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 4.2,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "FlipAngle": 90,
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "SeriesDescription": "ABCD_dMRI",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.11666666666666667,
-        0.23333333333333334,
-        0.35,
-        0.4666666666666667,
-        0.5833333333333334,
-        0.7,
-        0.8166666666666667,
-        0.9333333333333333,
-        1.05,
-        1.1666666666666667,
-        1.2833333333333334,
-        1.4,
-        1.5166666666666666,
-        1.6333333333333333,
-        1.75,
-        1.8666666666666667,
-        1.9833333333333334,
-        2.1,
-        2.216666666666667,
-        2.3333333333333335,
-        2.45,
-        2.566666666666667,
-        2.6833333333333336,
-        2.8,
-        2.9166666666666665,
-        3.033333333333333,
-        3.15,
-        3.2666666666666666,
-        3.3833333333333333,
-        3.5,
-        3.6166666666666667,
-        3.7333333333333334,
-        3.85,
-        3.966666666666667,
-        4.083333333333333
-    ],
-    "PhaseEncodingDirection": "j",
-    "SoftwareVersions": "syngo_MR_E11"
-}
\ No newline at end of file
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz b/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz
deleted file mode 100644
index af8d3e5ac..000000000
Binary files a/BIDS_Dataset/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json b/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json
deleted file mode 100644
index 179945b6b..000000000
--- a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoTime": 0.004,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "InstitutionName": "HUP6",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 7,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz b/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz
deleted file mode 100644
index 8a7f44f4d..000000000
Binary files a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json b/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json
deleted file mode 100644
index 370334c18..000000000
--- a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoNumber": 2,
-    "EchoTime": 0.00646,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "InstitutionName": "HUP6",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 7,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz b/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz
deleted file mode 100644
index 4a99378f3..000000000
Binary files a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json b/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json
deleted file mode 100644
index e13c68063..000000000
--- a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-    "IntendedFor": [
-        "ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz"
-    ],
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoNumber": 2,
-    "EchoTime1": 0.004,
-    "EchoTime2": 0.00646,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "P",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 8,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz b/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz
deleted file mode 100644
index daf5e956e..000000000
Binary files a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json b/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json
deleted file mode 100644
index c000ebb6c..000000000
--- a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "TotalReadoutTime": 0.0717598,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 4.2,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "FlipAngle": 90,
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "SeriesDescription": "ABCD_dMRI",
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.11666666666666667,
-        0.23333333333333334,
-        0.35,
-        0.4666666666666667,
-        0.5833333333333334,
-        0.7,
-        0.8166666666666667,
-        0.9333333333333333,
-        1.05,
-        1.1666666666666667,
-        1.2833333333333334,
-        1.4,
-        1.5166666666666666,
-        1.6333333333333333,
-        1.75,
-        1.8666666666666667,
-        1.9833333333333334,
-        2.1,
-        2.216666666666667,
-        2.3333333333333335,
-        2.45,
-        2.566666666666667,
-        2.6833333333333336,
-        2.8,
-        2.9166666666666665,
-        3.033333333333333,
-        3.15,
-        3.2666666666666666,
-        3.3833333333333333,
-        3.5,
-        3.6166666666666667,
-        3.7333333333333334,
-        3.85,
-        3.966666666666667,
-        4.083333333333333
-    ],
-    "PhaseEncodingDirection": "j-",
-    "SoftwareVersions": "syngo_MR_E11",
-    "IntendedFor": [
-        "ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz"
-    ]
-}
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz b/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz
deleted file mode 100644
index b60186d5a..000000000
Binary files a/BIDS_Dataset/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json b/BIDS_Dataset/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json
deleted file mode 100644
index 14dbbc97e..000000000
--- a/BIDS_Dataset/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "TotalReadoutTime": 0.0717598,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "TaskName": "rest",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 1.0,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "FlipAngle": 70,
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "SeriesDescription": "ABCD_dMRI",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.027131782945736437,
-        0.054263565891472874,
-        0.0813953488372093,
-        0.10852713178294575,
-        0.1356589147286822,
-        0.1627906976744186,
-        0.18992248062015504,
-        0.2170542635658915,
-        0.24418604651162792,
-        0.2713178294573644,
-        0.2984496124031008,
-        0.3255813953488372,
-        0.35271317829457366,
-        0.3798449612403101,
-        0.4069767441860465,
-        0.434108527131783,
-        0.4612403100775194,
-        0.48837209302325585,
-        0.5155038759689923,
-        0.5426356589147288,
-        0.5697674418604651,
-        0.5968992248062016,
-        0.6240310077519381,
-        0.6511627906976744,
-        0.6782945736434108,
-        0.7054263565891473,
-        0.7325581395348837,
-        0.7596899224806202,
-        0.7868217054263567,
-        0.813953488372093,
-        0.8410852713178295,
-        0.868217054263566,
-        0.8953488372093024,
-        0.9224806201550388,
-        0.9496124031007752
-    ],
-    "PhaseEncodingDirection": "j",
-    "SoftwareVersions": "syngo_MR_E11"
-}
\ No newline at end of file
diff --git a/BIDS_Dataset/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz b/BIDS_Dataset/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz
deleted file mode 100644
index af8d3e5ac..000000000
Binary files a/BIDS_Dataset/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/anat/sub-04_ses-phdiff_T1w.json b/BIDS_Dataset/sub-04/ses-phdiff/anat/sub-04_ses-phdiff_T1w.json
deleted file mode 100644
index c9dff6bf0..000000000
--- a/BIDS_Dataset/sub-04/ses-phdiff/anat/sub-04_ses-phdiff_T1w.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "DeviceSerialNumber": "167024",
-    "SoftwareVersions": "syngo_MR_E11",
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "ScanningSequence": "GR_IR",
-    "SequenceVariant": "SK_SP_MP",
-    "SeriesDescription": "ABCD_T1w_MPR_vNav",
-    "BodyPartExamined": "BRAIN",
-    "ProtocolName": "ABCD_T1w_MPR_vNav",
-    "SequenceName": "tfl3d1_16ns",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND",
-        "NORM"
-    ],
-    "AcquisitionTime": "16:15:31.770000",
-    "MagneticFieldStrength": 3,
-    "FlipAngle": 8,
-    "EchoTime": 0.0029,
-    "RepetitionTime": 2.5,
-    "InversionTime": 1.07,
-    "PhaseEncodingLines": 256,
-    "PhaseEncodingDirection": "i-",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0"
-}
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/anat/sub-04_ses-phdiff_T1w.nii.gz b/BIDS_Dataset/sub-04/ses-phdiff/anat/sub-04_ses-phdiff_T1w.nii.gz
deleted file mode 100644
index 5dd2f5e70..000000000
Binary files a/BIDS_Dataset/sub-04/ses-phdiff/anat/sub-04_ses-phdiff_T1w.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.bval b/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.bval
deleted file mode 100644
index 551603c53..000000000
--- a/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.bval
+++ /dev/null
@@ -1,1 +0,0 @@
-0 0 2000 3780 3800 4380 2195 2205 4200 3570 1005 2800 3790 3390 0 3605 3980 2575 3605 4195 3570 4175 3385 3395 4185 2395 4985 0 1800 1800 3780 1610 4000 4170 1190 2785 3215 200 1985 3980 0 3385 4385 4955 395 3975 3390 3965 3395 205 3385 4385 5015 990 1800 1010 1190 2605 2195 4380 0 
\ No newline at end of file
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.bvec b/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.bvec
deleted file mode 100644
index d31e09213..000000000
--- a/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.bvec
+++ /dev/null
@@ -1,3 +0,0 @@
-0 0 0.947306 -0.689491 -0.687391 -0.640236 0.904801 0.301134 0.218033 0.236237 -0.00045876 -0.267232 -0.229644 0.727918 0 -0.235344 -0.895859 0.556585 -0.235344 -0.872345 0.236237 0.218536 -0.485657 -0.969313 0.873651 0.577663 0.999993 0 -0.665829 0.665829 -0.689491 0.704677 -0.00022427 -0.437403 0.409502 0.26769 -0.00031134 0.999772 -0.00016233 0.895859 0 0.971029 0.426584 0 -0.712479 -0.00011346 -0.727918 -0.448521 -0.484877 -0.00487633 -0.485657 -0.426584 -0.00019956 -0.00045946 0.665829 -0.445079 0.409502 -0.830354 -0.904801 0.640236 0 
-0 0 -0.320301 -0.233031 0.690471 -0.429664 -0.305819 -0.906545 0.874886 0.239537 0.898412 0.804939 0.691594 0.488404 0 -0.943991 -0.00303821 -0.00388069 0.943991 -0.439269 -0.239537 0.439998 0.488955 -0.245811 0.221429 -0.581525 -0.00280889 0 0.670455 -0.670455 0.233031 -0.709514 -0.896432 0.221712 -0.414997 -0.538836 -0.999995 -0.0151408 0.32154 -0.00303821 0 -0.00329842 0.642719 -0.00262411 -0.0090312 -0.450857 0.488404 -0.00293403 -0.730564 -0.999882 -0.488955 -0.642719 -0.999997 -0.454441 0.670455 -0.895473 0.414997 -0.557225 -0.305819 -0.429664 0 
-0 0 -0.00426696 -0.685783 -0.225265 -0.636779 -0.296327 -0.295796 -0.432477 -0.941708 -0.439154 -0.529773 -0.684807 -0.481245 0 -0.231289 -0.444328 -0.830781 -0.231289 -0.214611 -0.941708 -0.871001 -0.724611 -0.00307126 -0.433248 -0.57283 -0.00260781 0 -0.327355 -0.327355 -0.685783 -0.00439859 -0.443181 -0.871506 -0.812457 -0.798748 -0.00311231 -0.0150655 -0.946896 -0.444328 0 -0.238939 -0.636348 -0.999997 -0.701635 -0.892596 -0.481245 -0.893768 -0.480802 -0.014558 -0.724611 -0.636348 -0.00259323 -0.890777 -0.327355 -0.00576167 -0.812457 -0.00362001 -0.296327 -0.636779 0 
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.json b/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.json
deleted file mode 100644
index ab24e0601..000000000
--- a/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.json
+++ /dev/null
@@ -1,75 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "TotalReadoutTime": 0.072,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 4.2,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "FlipAngle": 90,
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "SeriesDescription": "ABCD_dMRI",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.11666666666666667,
-        0.23333333333333334,
-        0.35,
-        0.4666666666666667,
-        0.5833333333333334,
-        0.7,
-        0.8166666666666667,
-        0.9333333333333333,
-        1.05,
-        1.1666666666666667,
-        1.2833333333333334,
-        1.4,
-        1.5166666666666666,
-        1.6333333333333333,
-        1.75,
-        1.8666666666666667,
-        1.9833333333333334,
-        2.1,
-        2.216666666666667,
-        2.3333333333333335,
-        2.45,
-        2.566666666666667,
-        2.6833333333333336,
-        2.8,
-        2.9166666666666665,
-        3.033333333333333,
-        3.15,
-        3.2666666666666666,
-        3.3833333333333333,
-        3.5,
-        3.6166666666666667,
-        3.7333333333333334,
-        3.85,
-        3.966666666666667,
-        4.083333333333333
-    ],
-    "PhaseEncodingDirection": "j",
-    "SoftwareVersions": "syngo_MR_E11"
-}
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.nii.gz b/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.nii.gz
deleted file mode 100644
index af8d3e5ac..000000000
Binary files a/BIDS_Dataset/sub-04/ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude1.json b/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude1.json
deleted file mode 100644
index 179945b6b..000000000
--- a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude1.json
+++ /dev/null
@@ -1,67 +0,0 @@
-{
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoTime": 0.004,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "InstitutionName": "HUP6",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 7,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude1.nii.gz b/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude1.nii.gz
deleted file mode 100644
index 8a7f44f4d..000000000
Binary files a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude1.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude2.json b/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude2.json
deleted file mode 100644
index 370334c18..000000000
--- a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude2.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoNumber": 2,
-    "EchoTime": 0.00646,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "M",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "InstitutionName": "HUP6",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 7,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude2.nii.gz b/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude2.nii.gz
deleted file mode 100644
index 4a99378f3..000000000
Binary files a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_magnitude2.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_phasediff.json b/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_phasediff.json
deleted file mode 100644
index 234ac439d..000000000
--- a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_phasediff.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
-    "IntendedFor": [
-        "ses-phdiff/dwi/sub-04_ses-phdiff_acq-HASC55AP_dwi.nii.gz"
-    ],
-    "AcquisitionMatrixPE": 64,
-    "AcquisitionNumber": 1,
-    "BaseResolution": 64,
-    "BodyPartExamined": "BRAIN",
-    "ConsistencyInfo": "N4_VE11C_LATEST_20160120",
-    "ConversionSoftware": "dcm2niix",
-    "ConversionSoftwareVersion": "v1.0.20180622 GCC6.3.0",
-    "EchoNumber": 2,
-    "EchoTime1": 0.004,
-    "EchoTime2": 0.00646,
-    "FlipAngle": 60,
-    "ImageOrientationPatientDICOM": [
-        1,
-        0,
-        0,
-        0,
-        1,
-        0
-    ],
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "P",
-        "ND"
-    ],
-    "InPlanePhaseEncodingDirectionDICOM": "COL",
-    "MRAcquisitionType": "2D",
-    "MagneticFieldStrength": 3,
-    "Manufacturer": "Siemens",
-    "ManufacturersModelName": "Prisma_fit",
-    "Modality": "MR",
-    "PartialFourier": 0.75,
-    "PatientPosition": "HFS",
-    "PercentPhaseFOV": 100,
-    "PhaseEncodingDirection": "j-",
-    "PhaseEncodingSteps": 48,
-    "PhaseResolution": 1,
-    "PixelBandwidth": 500,
-    "ProtocolName": "B0map_v4",
-    "PulseSequenceDetails": "%SiemensSeq%_gre_field_mapping",
-    "ReceiveCoilActiveElements": "HEA;HEP",
-    "ReceiveCoilName": "Head_32",
-    "ReconMatrixPE": 64,
-    "RepetitionTime": 1.5,
-    "SAR": 0.0935879,
-    "ScanOptions": "PFP_FS",
-    "ScanningSequence": "GR",
-    "SequenceName": "_fm2d2",
-    "SequenceVariant": "SP",
-    "SeriesDescription": "B0map_v4",
-    "SeriesNumber": 8,
-    "ShimSetting": [
-        1747,
-        -3883,
-        -285,
-        583,
-        125,
-        -23,
-        -45,
-        -40
-    ],
-    "SliceThickness": 4,
-    "SoftwareVersions": "syngo_MR_E11",
-    "SpacingBetweenSlices": 4,
-    "StationName": "HUP_FNDBA_MR2",
-    "TxRefAmp": 220.327
-}
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_phasediff.nii.gz b/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_phasediff.nii.gz
deleted file mode 100644
index daf5e956e..000000000
Binary files a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_acq-v4_phasediff.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_dir-PA_epi.json b/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_dir-PA_epi.json
deleted file mode 100644
index 908819a88..000000000
--- a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_dir-PA_epi.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "TotalReadoutTime": 0.0717598,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 4.2,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "FlipAngle": 90,
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "SeriesDescription": "ABCD_dMRI",
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.11666666666666667,
-        0.23333333333333334,
-        0.35,
-        0.4666666666666667,
-        0.5833333333333334,
-        0.7,
-        0.8166666666666667,
-        0.9333333333333333,
-        1.05,
-        1.1666666666666667,
-        1.2833333333333334,
-        1.4,
-        1.5166666666666666,
-        1.6333333333333333,
-        1.75,
-        1.8666666666666667,
-        1.9833333333333334,
-        2.1,
-        2.216666666666667,
-        2.3333333333333335,
-        2.45,
-        2.566666666666667,
-        2.6833333333333336,
-        2.8,
-        2.9166666666666665,
-        3.033333333333333,
-        3.15,
-        3.2666666666666666,
-        3.3833333333333333,
-        3.5,
-        3.6166666666666667,
-        3.7333333333333334,
-        3.85,
-        3.966666666666667,
-        4.083333333333333
-    ],
-    "PhaseEncodingDirection": "j-",
-    "SoftwareVersions": "syngo_MR_E11",
-    "IntendedFor": [
-        "ses-phdiff/func/sub-04_ses-phdiff_task-rest_bold.nii.gz"
-    ]
-}
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_dir-PA_epi.nii.gz b/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_dir-PA_epi.nii.gz
deleted file mode 100644
index b60186d5a..000000000
Binary files a/BIDS_Dataset/sub-04/ses-phdiff/fmap/sub-04_ses-phdiff_dir-PA_epi.nii.gz and /dev/null differ
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/func/sub-04_ses-phdiff_task-rest_bold.json b/BIDS_Dataset/sub-04/ses-phdiff/func/sub-04_ses-phdiff_task-rest_bold.json
deleted file mode 100644
index 14dbbc97e..000000000
--- a/BIDS_Dataset/sub-04/ses-phdiff/func/sub-04_ses-phdiff_task-rest_bold.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
-    "ProcedureStepDescription": "MR_HEAD_WO_IV_CONTRAST",
-    "DeviceSerialNumber": "167024",
-    "EffectiveEchoSpacing": 0.000689998,
-    "TotalReadoutTime": 0.0717598,
-    "ManufacturersModelName": "Prisma_fit",
-    "ProtocolName": "ABCD_dMRI",
-    "TaskName": "rest",
-    "BandwidthPerPixelPhaseEncode": 10.352,
-    "PhaseEncodingLines": 140,
-    "RepetitionTime": 1.0,
-    "EchoTrainLength": 105,
-    "MagneticFieldStrength": 3,
-    "AcquisitionNumber": 1,
-    "InstitutionName": "HUP",
-    "BodyPartExamined": "BRAIN",
-    "ConversionSoftware": "dcm2niix",
-    "ScanningSequence": "EP",
-    "Manufacturer": "Siemens",
-    "FlipAngle": 70,
-    "ConversionSoftwareVersion": "v1.0.20170724 (OpenJPEG build) GCC6.1.0",
-    "SeriesDescription": "ABCD_dMRI",
-    "InstitutionAddress": "Spruce_Street_3400_Philadelphia_Pennsylvania_US_19104",
-    "AcquisitionTime": "16:31:6.145000",
-    "SequenceName": "ep_b0",
-    "ImageType": [
-        "ORIGINAL",
-        "PRIMARY",
-        "DIFFUSION",
-        "NONE",
-        "ND",
-        "MOSAIC"
-    ],
-    "EchoTime": 0.089,
-    "SequenceVariant": "SK_SP",
-    "SliceTiming": [
-        0.0,
-        0.027131782945736437,
-        0.054263565891472874,
-        0.0813953488372093,
-        0.10852713178294575,
-        0.1356589147286822,
-        0.1627906976744186,
-        0.18992248062015504,
-        0.2170542635658915,
-        0.24418604651162792,
-        0.2713178294573644,
-        0.2984496124031008,
-        0.3255813953488372,
-        0.35271317829457366,
-        0.3798449612403101,
-        0.4069767441860465,
-        0.434108527131783,
-        0.4612403100775194,
-        0.48837209302325585,
-        0.5155038759689923,
-        0.5426356589147288,
-        0.5697674418604651,
-        0.5968992248062016,
-        0.6240310077519381,
-        0.6511627906976744,
-        0.6782945736434108,
-        0.7054263565891473,
-        0.7325581395348837,
-        0.7596899224806202,
-        0.7868217054263567,
-        0.813953488372093,
-        0.8410852713178295,
-        0.868217054263566,
-        0.8953488372093024,
-        0.9224806201550388,
-        0.9496124031007752
-    ],
-    "PhaseEncodingDirection": "j",
-    "SoftwareVersions": "syngo_MR_E11"
-}
\ No newline at end of file
diff --git a/BIDS_Dataset/sub-04/ses-phdiff/func/sub-04_ses-phdiff_task-rest_bold.nii.gz b/BIDS_Dataset/sub-04/ses-phdiff/func/sub-04_ses-phdiff_task-rest_bold.nii.gz
deleted file mode 100644
index af8d3e5ac..000000000
Binary files a/BIDS_Dataset/sub-04/ses-phdiff/func/sub-04_ses-phdiff_task-rest_bold.nii.gz and /dev/null differ
diff --git a/cubids/cli.py b/cubids/cli.py
index 5a693d203..40c2eca84 100644
--- a/cubids/cli.py
+++ b/cubids/cli.py
@@ -1,28 +1,11 @@
 """Console script for cubids."""
 import argparse
-import json
 import logging
 import os
-import re
-import shutil
-import subprocess
-import sys
-import tempfile
 import warnings
 from pathlib import Path
 
-import pandas as pd
-import tqdm
-
-from cubids import CuBIDS
-from cubids.metadata_merge import merge_json_into_json
-from cubids.validator import (
-    build_subject_paths,
-    build_validator_call,
-    get_val_dictionary,
-    parse_validator_output,
-    run_validator,
-)
+from cubids import workflows
 
 warnings.simplefilter(action="ignore", category=FutureWarning)
 logging.basicConfig(level=logging.INFO)
@@ -31,8 +14,7 @@
 logging.getLogger("datalad").setLevel(logging.ERROR)
 
 
-def cubids_validate():
-    """Run the bids validator."""
+def _parse_validate():
     parser = argparse.ArgumentParser(
         description="cubids-validate: Wrapper around the official BIDS Validator",
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
@@ -101,216 +83,22 @@ def cubids_validate():
         nargs="+",
         required=False,
     )
-    opts = parser.parse_args()
-
-    # check status of output_prefix, absolute or relative?
-    abs_path_output = True
-    if "/" not in str(opts.output_prefix):
-        # not an absolute path --> put in code/CuBIDS dir
-        abs_path_output = False
-        # check if code/CuBIDS dir exists
-        if not Path(str(opts.bids_dir) + "/code/CuBIDS").is_dir():
-            # if not, create it
-            subprocess.run(["mkdir", str(opts.bids_dir) + "/code"])
-            subprocess.run(["mkdir", str(opts.bids_dir) + "/code/CuBIDS/"])
-
-    # Run directly from python using subprocess
-    if opts.container is None:
-        if not opts.sequential:
-            # run on full dataset
-            call = build_validator_call(
-                str(opts.bids_dir),
-                opts.ignore_nifti_headers,
-                opts.ignore_subject_consistency,
-            )
-            ret = run_validator(call)
-
-            # parse the string output
-            parsed = parse_validator_output(ret.stdout.decode("UTF-8"))
-            if parsed.shape[1] < 1:
-                logger.info("No issues/warnings parsed, your dataset is BIDS valid.")
-                sys.exit(0)
-            else:
-                logger.info("BIDS issues/warnings found in the dataset")
-
-                if opts.output_prefix:
-                    # check if absolute or relative path
-                    if abs_path_output:
-                        # normally, write dataframe to file in CLI
-                        val_tsv = str(opts.output_prefix) + "_validation.tsv"
-
-                    else:
-                        val_tsv = (
-                            str(opts.bids_dir)
-                            + "/code/CuBIDS/"
-                            + str(opts.output_prefix)
-                            + "_validation.tsv"
-                        )
-
-                    parsed.to_csv(val_tsv, sep="\t", index=False)
-
-                    # build validation data dictionary json sidecar
-                    val_dict = get_val_dictionary()
-                    val_json = val_tsv.replace("tsv", "json")
-                    with open(val_json, "w") as outfile:
-                        json.dump(val_dict, outfile, indent=4)
-
-                    logger.info("Writing issues out to %s", val_tsv)
-                    sys.exit(0)
-                else:
-                    # user may be in python session, return dataframe
-                    return parsed
-        else:
-            # logger.info("Prepping sequential validator run...")
-
-            # build a dictionary with {SubjectLabel: [List of files]}
-            subjects_dict = build_subject_paths(opts.bids_dir)
-
-            # logger.info("Running validator sequentially...")
-            # iterate over the dictionary
-
-            parsed = []
-
-            if opts.sequential_subjects:
-                subjects_dict = {
-                    k: v for k, v in subjects_dict.items() if k in opts.sequential_subjects
-                }
-            assert len(list(subjects_dict.keys())) > 1, "No subjects found in filter"
-            for subject, files_list in tqdm.tqdm(subjects_dict.items()):
-                # logger.info(" ".join(["Processing subject:", subject]))
-                # create a temporary directory and symlink the data
-                with tempfile.TemporaryDirectory() as tmpdirname:
-                    for fi in files_list:
-                        # cut the path down to the subject label
-                        bids_start = fi.find(subject)
-
-                        # maybe it's a single file
-                        if bids_start < 1:
-                            bids_folder = tmpdirname
-                            fi_tmpdir = tmpdirname
-
-                        else:
-                            bids_folder = Path(fi[bids_start:]).parent
-                            fi_tmpdir = tmpdirname + "/" + str(bids_folder)
-
-                        if not os.path.exists(fi_tmpdir):
-                            os.makedirs(fi_tmpdir)
-                        output = fi_tmpdir + "/" + str(Path(fi).name)
-                        shutil.copy2(fi, output)
-
-                    # run the validator
-                    nifti_head = opts.ignore_nifti_headers
-                    subj_consist = opts.ignore_subject_consistency
-                    call = build_validator_call(tmpdirname, nifti_head, subj_consist)
-                    ret = run_validator(call)
-                    # parse output
-                    if ret.returncode != 0:
-                        logger.error("Errors returned from validator run, parsing now")
+    return parser
 
-                    # parse the output and add to list if it returns a df
-                    decoded = ret.stdout.decode("UTF-8")
-                    tmp_parse = parse_validator_output(decoded)
-                    if tmp_parse.shape[1] > 1:
-                        tmp_parse["subject"] = subject
-                        parsed.append(tmp_parse)
 
-            # concatenate the parsed data and exit
-            if len(parsed) < 1:
-                logger.info("No issues/warnings parsed, your dataset is BIDS valid.")
-                sys.exit(0)
-
-            else:
-                parsed = pd.concat(parsed, axis=0)
-                subset = parsed.columns.difference(["subject"])
-                parsed = parsed.drop_duplicates(subset=subset)
-
-                logger.info("BIDS issues/warnings found in the dataset")
-
-                if opts.output_prefix:
-                    # normally, write dataframe to file in CLI
-                    if abs_path_output:
-                        val_tsv = str(opts.output_prefix) + "_validation.tsv"
-                    else:
-                        val_tsv = (
-                            str(opts.bids_dir)
-                            + "/code/CuBIDS/"
-                            + str(opts.output_prefix)
-                            + "_validation.tsv"
-                        )
-
-                    parsed.to_csv(val_tsv, sep="\t", index=False)
-
-                    # build validation data dictionary json sidecar
-                    val_dict = get_val_dictionary()
-                    val_json = val_tsv.replace("tsv", "json")
-                    with open(val_json, "w") as outfile:
-                        json.dump(val_dict, outfile, indent=4)
-
-                    logger.info("Writing issues out to file %s", val_tsv)
-                    sys.exit(0)
-                else:
-                    # user may be in python session, return dataframe
-                    return parsed
-
-    # Run it through a container
-    container_type = _get_container_type(opts.container)
-    bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids:ro"
-    output_dir_link_t = str(opts.output_prefix.parent.absolute()) + ":/tsv:rw"
-    output_dir_link_j = str(opts.output_prefix.parent.absolute()) + ":/json:rw"
-    linked_output_prefix_t = "/tsv/" + opts.output_prefix.name
-    if container_type == "docker":
-        cmd = [
-            "docker",
-            "run",
-            "--rm",
-            "-v",
-            bids_dir_link,
-            "-v",
-            GIT_CONFIG + ":/root/.gitconfig",
-            "-v",
-            output_dir_link_t,
-            "-v",
-            output_dir_link_j,
-            "--entrypoint",
-            "cubids-validate",
-            opts.container,
-            "/bids",
-            linked_output_prefix_t,
-        ]
-        if opts.ignore_nifti_headers:
-            cmd.append("--ignore_nifti_headers")
-        if opts.ignore_subject_consistency:
-            cmd.append("--ignore_subject_consistency")
-    elif container_type == "singularity":
-        cmd = [
-            "singularity",
-            "exec",
-            "--cleanenv",
-            "-B",
-            bids_dir_link,
-            "-B",
-            output_dir_link_t,
-            "-B",
-            output_dir_link_j,
-            opts.container,
-            "cubids-validate",
-            "/bids",
-            linked_output_prefix_t,
-        ]
-        if opts.ignore_nifti_headers:
-            cmd.append("--ignore_nifti_headers")
-        if opts.ignore_subject_consistency:
-            cmd.append("--ignore_subject_consistency")
-        if opts.sequential:
-            cmd.append("--sequential")
-
-    print("RUNNING: " + " ".join(cmd))
-    proc = subprocess.run(cmd)
-    sys.exit(proc.returncode)
+def _enter_validate(argv=None):
+    warnings.warn(
+        "cubids-validate is deprecated and will be removed in the future. "
+        "Please use cubids validate.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    options = _parse_validate().parse_args(argv)
+    args = vars(options).copy()
+    workflows.validate(**args)
 
 
-def bids_sidecar_merge():
-    """Merge critical keys from one sidecar to another."""
+def _parse_bids_sidecar_merge():
     parser = argparse.ArgumentParser(
         description=("bids-sidecar-merge: merge critical keys from one sidecar to another"),
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
@@ -322,13 +110,22 @@ def bids_sidecar_merge():
         action="store",
         help=("destination json. This file will have data from `from_json` copied into it."),
     )
-    opts = parser.parse_args()
-    merge_status = merge_json_into_json(opts.from_json, opts.to_json, raise_on_error=False)
-    sys.exit(merge_status)
+    return parser
+
+
+def _enter_bids_sidecar_merge(argv=None):
+    warnings.warn(
+        "bids-sidecar-merge is deprecated and will be removed in the future. "
+        "Please use cubids bids-sidecar-merge.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    options = _parse_bids_sidecar_merge().parse_args(argv)
+    args = vars(options).copy()
+    workflows.bids_sidecar_merge(**args)
 
 
-def cubids_group():
-    """Find key and param groups."""
+def _parse_group():
     parser = argparse.ArgumentParser(
         description="cubids-group: find key and parameter groups in BIDS",
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
@@ -364,89 +161,28 @@ def cubids_group():
     parser.add_argument(
         "--acq-group-level",
         default="subject",
+        choices=["subject", "session"],
         action="store",
-        help=("Level at which acquisition groups are created " 'options: "subject" or "session"'),
+        help=("Level at which acquisition groups are created options: 'subject' or 'session'"),
     )
     parser.add_argument(
         "--config", action="store", type=Path, help="path to a config file for grouping"
     )
-    opts = parser.parse_args()
-
-    # Run directly from python using
-    if opts.container is None:
-        bod = CuBIDS(
-            data_root=str(opts.bids_dir),
-            acq_group_level=opts.acq_group_level,
-            grouping_config=opts.config,
-        )
-        bod.get_tsvs(
-            str(opts.output_prefix),
-        )
-        sys.exit(0)
-
-    # Run it through a container
-    container_type = _get_container_type(opts.container)
-    bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids"
-    output_dir_link = str(opts.output_prefix.parent.absolute()) + ":/tsv:rw"
+    return parser
 
-    apply_config = opts.config is not None
-    if apply_config:
-        input_config_dir_link = str(opts.config.parent.absolute()) + ":/in_config:ro"
-        linked_input_config = "/in_config/" + opts.config.name
 
-    linked_output_prefix = "/tsv/" + opts.output_prefix.name
-    if container_type == "docker":
-        cmd = [
-            "docker",
-            "run",
-            "--rm",
-            "-v",
-            bids_dir_link,
-            "-v",
-            GIT_CONFIG + ":/root/.gitconfig",
-            "-v",
-            output_dir_link,
-            "--entrypoint",
-            "cubids-group",
-            opts.container,
-            "/bids",
-            linked_output_prefix,
-        ]
-        if apply_config:
-            cmd.insert(3, "-v")
-            cmd.insert(4, input_config_dir_link)
-            cmd += ["--config", linked_input_config]
-
-    elif container_type == "singularity":
-        cmd = [
-            "singularity",
-            "exec",
-            "--cleanenv",
-            "-B",
-            bids_dir_link,
-            "-B",
-            output_dir_link,
-            opts.container,
-            "cubids-group",
-            "/bids",
-            linked_output_prefix,
-        ]
-        if apply_config:
-            cmd.insert(3, "-B")
-            cmd.insert(4, input_config_dir_link)
-            cmd += ["--config", linked_input_config]
-
-    if opts.acq_group_level:
-        cmd.append("--acq-group-level")
-        cmd.append(str(opts.acq_group_level))
-
-    print("RUNNING: " + " ".join(cmd))
-    proc = subprocess.run(cmd)
-    sys.exit(proc.returncode)
+def _enter_group(argv=None):
+    warnings.warn(
+        "cubids-group is deprecated and will be removed in the future. Please use cubids group.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    options = _parse_group().parse_args(argv)
+    args = vars(options).copy()
+    workflows.group(**args)
 
 
-def cubids_apply():
-    """Apply the tsv changes."""
+def _parse_apply():
     parser = argparse.ArgumentParser(
         description=("cubids-apply: apply the changes specified in a tsv to a BIDS directory"),
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
@@ -510,121 +246,29 @@ def cubids_apply():
     parser.add_argument(
         "--acq-group-level",
         default="subject",
+        choices=["subject", "session"],
         action="store",
-        help=("Level at which acquisition groups are created " 'options: "subject" or "session"'),
+        help=("Level at which acquisition groups are created options: 'subject' or 'session'"),
     )
     parser.add_argument(
         "--config", action="store", type=Path, help="path to a config file for grouping"
     )
-    opts = parser.parse_args()
-
-    # Run directly from python using
-    if opts.container is None:
-        bod = CuBIDS(
-            data_root=str(opts.bids_dir),
-            use_datalad=opts.use_datalad,
-            acq_group_level=opts.acq_group_level,
-            grouping_config=opts.config,
-        )
-        if opts.use_datalad:
-            if not bod.is_datalad_clean():
-                raise Exception("Untracked change in " + str(opts.bids_dir))
-        bod.apply_tsv_changes(
-            str(opts.edited_summary_tsv),
-            str(opts.files_tsv),
-            str(opts.new_tsv_prefix),
-            raise_on_error=False,
-        )
-        sys.exit(0)
-
-    # Run it through a container
-    container_type = _get_container_type(opts.container)
-    bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids"
-    input_summary_tsv_dir_link = (
-        str(opts.edited_tsv_prefix.parent.absolute()) + ":/in_summary_tsv:ro"
-    )
-    input_files_tsv_dir_link = str(opts.edited_tsv_prefix.parent.absolute()) + ":/in_files_tsv:ro"
-    output_tsv_dir_link = str(opts.new_tsv_prefix.parent.absolute()) + ":/out_tsv:rw"
 
-    # FROM BOND-GROUP
-    apply_config = opts.config is not None
-    if apply_config:
-        input_config_dir_link = str(opts.config.parent.absolute()) + ":/in_config:ro"
-        linked_input_config = "/in_config/" + opts.config.name
+    return parser
 
-    linked_output_prefix = "/tsv/" + opts.output_prefix.name
 
-    ####
-    linked_input_summary_tsv = "/in_summary_tsv/" + opts.edited_summary_tsv.name
-    linked_input_files_tsv = "/in_files_tsv/" + opts.files_tsv.name
-    linked_output_prefix = "/out_tsv/" + opts.new_tsv_prefix.name
-    if container_type == "docker":
-        cmd = [
-            "docker",
-            "run",
-            "--rm",
-            "-v",
-            bids_dir_link,
-            "-v",
-            GIT_CONFIG + ":/root/.gitconfig",
-            "-v",
-            input_summary_tsv_dir_link,
-            "-v",
-            input_files_tsv_dir_link,
-            "-v",
-            output_tsv_dir_link,
-            "--entrypoint",
-            "cubids-apply",
-            opts.container,
-            "/bids",
-            linked_input_summary_tsv,
-            linked_input_files_tsv,
-            linked_output_prefix,
-        ]
-        if apply_config:
-            cmd.insert(3, "-v")
-            cmd.insert(4, input_config_dir_link)
-            cmd += ["--config", linked_input_config]
-
-    elif container_type == "singularity":
-        cmd = [
-            "singularity",
-            "exec",
-            "--cleanenv",
-            "-B",
-            bids_dir_link,
-            "-B",
-            input_summary_tsv_dir_link,
-            "-B",
-            input_files_tsv_dir_link,
-            "-B",
-            output_tsv_dir_link,
-            opts.container,
-            "cubids-apply",
-            "/bids",
-            linked_input_summary_tsv,
-            linked_input_files_tsv,
-            linked_output_prefix,
-        ]
-        if apply_config:
-            cmd.insert(3, "-B")
-            cmd.insert(4, input_config_dir_link)
-            cmd += ["--config", linked_input_config]
-
-    if opts.use_datalad:
-        cmd.append("--use-datalad")
-
-    if opts.acq_group_level:
-        cmd.append("--acq-group-level")
-        cmd.append(str(opts.acq_group_level))
-
-    print("RUNNING: " + " ".join(cmd))
-    proc = subprocess.run(cmd)
-    sys.exit(proc.returncode)
+def _enter_apply(argv=None):
+    warnings.warn(
+        "cubids-apply is deprecated and will be removed in the future. Please use cubids apply.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    options = _parse_apply().parse_args(argv)
+    args = vars(options).copy()
+    workflows.apply(**args)
 
 
-def cubids_datalad_save():
-    """Perform datalad save."""
+def _parse_datalad_save():
     parser = argparse.ArgumentParser(
         description=("cubids-datalad-save: perform a DataLad save on a BIDS directory"),
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
@@ -644,53 +288,23 @@ def cubids_datalad_save():
         action="store",
         help="Docker image tag or Singularity image file.",
     )
-    opts = parser.parse_args()
 
-    # Run directly from python using
-    if opts.container is None:
-        bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=True)
-        bod.datalad_save(message=opts.m)
-        sys.exit(0)
+    return parser
+
 
-    # Run it through a container
-    container_type = _get_container_type(opts.container)
-    bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids"
-    if container_type == "docker":
-        cmd = [
-            "docker",
-            "run",
-            "--rm",
-            "-v",
-            bids_dir_link,
-            "-v",
-            GIT_CONFIG + ":/root/.gitconfig",
-            "--entrypoint",
-            "cubids-datalad-save",
-            opts.container,
-            "/bids",
-            "-m",
-            opts.m,
-        ]
-    elif container_type == "singularity":
-        cmd = [
-            "singularity",
-            "exec",
-            "--cleanenv",
-            "-B",
-            bids_dir_link,
-            opts.container,
-            "cubids-datalad-save",
-            "/bids",
-            "-m",
-            opts.m,
-        ]
-    print("RUNNING: " + " ".join(cmd))
-    proc = subprocess.run(cmd)
-    sys.exit(proc.returncode)
+def _enter_datalad_save(argv=None):
+    warnings.warn(
+        "cubids-datalad-save is deprecated and will be removed in the future. "
+        "Please use cubids datalad-save.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    options = _parse_datalad_save().parse_args(argv)
+    args = vars(options).copy()
+    workflows.datalad_save(**args)
 
 
-def cubids_undo():
-    """Revert the most recent commit."""
+def _parse_undo():
     parser = argparse.ArgumentParser(
         description="cubids-undo: revert most recent commit",
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
@@ -709,49 +323,22 @@ def cubids_undo():
         action="store",
         help="Docker image tag or Singularity image file.",
     )
-    opts = parser.parse_args()
 
-    # Run directly from python using
-    if opts.container is None:
-        bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=True)
-        bod.datalad_undo_last_commit()
-        sys.exit(0)
+    return parser
+
 
-    # Run it through a container
-    container_type = _get_container_type(opts.container)
-    bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids"
-    if container_type == "docker":
-        cmd = [
-            "docker",
-            "run",
-            "--rm",
-            "-v",
-            bids_dir_link,
-            "-v",
-            GIT_CONFIG + ":/root/.gitconfig",
-            "--entrypoint",
-            "cubids-undo",
-            opts.container,
-            "/bids",
-        ]
-    elif container_type == "singularity":
-        cmd = [
-            "singularity",
-            "exec",
-            "--cleanenv",
-            "-B",
-            bids_dir_link,
-            opts.container,
-            "cubids-undo",
-            "/bids",
-        ]
-    print("RUNNING: " + " ".join(cmd))
-    proc = subprocess.run(cmd)
-    sys.exit(proc.returncode)
+def _enter_undo(argv=None):
+    warnings.warn(
+        "cubids-undo is deprecated and will be removed in the future. Please use cubids undo.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    options = _parse_undo().parse_args(argv)
+    args = vars(options).copy()
+    workflows.undo(**args)
 
 
-def cubids_copy_exemplars():
-    """Create and save a directory with one subject from each acquisition group."""
+def _parse_copy_exemplars():
     parser = argparse.ArgumentParser(
         description=(
             "cubids-copy-exemplars: create and save a directory with "
@@ -808,84 +395,22 @@ def cubids_copy_exemplars():
         action="store",
         help="Docker image tag or Singularity image file.",
     )
-    opts = parser.parse_args()
-
-    # Run directly from python using
-    if opts.container is None:
-        bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=opts.use_datalad)
-        if opts.use_datalad:
-            if not bod.is_datalad_clean():
-                raise Exception(
-                    "Untracked changes. Need to save "
-                    + str(opts.bids_dir)
-                    + " before coyping exemplars"
-                )
-        bod.copy_exemplars(
-            str(opts.exemplars_dir),
-            str(opts.exemplars_tsv),
-            min_group_size=opts.min_group_size,
-        )
-        sys.exit(0)
-
-    # Run it through a container
-    container_type = _get_container_type(opts.container)
-    bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids:ro"
-    exemplars_dir_link = str(opts.exemplars_dir.absolute()) + ":/exemplars:ro"
-    exemplars_tsv_link = str(opts.exemplars_tsv.absolute()) + ":/in_tsv:ro"
-    if container_type == "docker":
-        cmd = [
-            "docker",
-            "run",
-            "--rm",
-            "-v",
-            bids_dir_link,
-            "-v",
-            exemplars_dir_link,
-            "-v",
-            GIT_CONFIG + ":/root/.gitconfig",
-            "-v",
-            exemplars_tsv_link,
-            "--entrypoint",
-            "cubids-copy-exemplars",
-            opts.container,
-            "/bids",
-            "/exemplars",
-            "/in_tsv",
-        ]
+    return parser
 
-        if opts.force_unlock:
-            cmd.append("--force-unlock")
-        if opts.min_group_size:
-            cmd.append("--min-group-size")
-    elif container_type == "singularity":
-        cmd = [
-            "singularity",
-            "exec",
-            "--cleanenv",
-            "-B",
-            bids_dir_link,
-            "-B",
-            exemplars_dir_link,
-            "-B",
-            exemplars_tsv_link,
-            opts.container,
-            "cubids-copy-exemplars",
-            "/bids",
-            "/exemplars",
-            "/in_tsv",
-        ]
-        if opts.force_unlock:
-            cmd.append("--force-unlock")
-        if opts.min_group_size:
-            cmd.append("--min-group-size")
 
-    print("RUNNING: " + " ".join(cmd))
-    proc = subprocess.run(cmd)
-    sys.exit(proc.returncode)
+def _enter_copy_exemplars(argv=None):
+    warnings.warn(
+        "cubids-copy-exemplars is deprecated and will be removed in the future. "
+        "Please use cubids copy-exemplars.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    options = _parse_copy_exemplars().parse_args(argv)
+    args = vars(options).copy()
+    workflows.copy_exemplars(**args)
 
 
-def cubids_add_nifti_info():
-    """Add information from nifti files to the dataset's sidecars."""
+def _parse_add_nifti_info():
     parser = argparse.ArgumentParser(
         description=(
             "cubids-add-nifti-info: Add information from nifti"
@@ -918,64 +443,22 @@ def cubids_add_nifti_info():
         action="store",
         help="Docker image tag or Singularity image file.",
     )
-    opts = parser.parse_args()
-
-    # Run directly from python using
-    if opts.container is None:
-        bod = CuBIDS(
-            data_root=str(opts.bids_dir),
-            use_datalad=opts.use_datalad,
-            force_unlock=opts.force_unlock,
-        )
-        if opts.use_datalad:
-            if not bod.is_datalad_clean():
-                raise Exception("Untracked change in " + str(opts.bids_dir))
-            # if bod.is_datalad_clean() and not opts.force_unlock:
-            #     raise Exception("Need to unlock " + str(opts.bids_dir))
-        bod.add_nifti_info()
-        sys.exit(0)
-
-    # Run it through a container
-    container_type = _get_container_type(opts.container)
-    bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids:ro"
-    if container_type == "docker":
-        cmd = [
-            "docker",
-            "run",
-            "--rm",
-            "-v",
-            bids_dir_link,
-            "-v",
-            GIT_CONFIG + ":/root/.gitconfig",
-            "--entrypoint",
-            "cubids-add-nifti-info",
-            opts.container,
-            "/bids",
-        ]
+    return parser
 
-        if opts.force_unlock:
-            cmd.append("--force-unlock")
-    elif container_type == "singularity":
-        cmd = [
-            "singularity",
-            "exec",
-            "--cleanenv",
-            "-B",
-            bids_dir_link,
-            opts.container,
-            "cubids-add-nifti-info",
-            "/bids",
-        ]
-        if opts.force_unlock:
-            cmd.append("--force-unlock")
 
-    print("RUNNING: " + " ".join(cmd))
-    proc = subprocess.run(cmd)
-    sys.exit(proc.returncode)
+def _enter_add_nifti_info(argv=None):
+    warnings.warn(
+        "cubids-add-nifti-info is deprecated and will be removed in the future. "
+        "Please use cubids add-nifti-info.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    options = _parse_add_nifti_info().parse_args(argv)
+    args = vars(options).copy()
+    workflows.add_nifti_info(**args)
 
 
-def cubids_purge():
-    """Purge scan associations."""
+def _parse_purge():
     parser = argparse.ArgumentParser(
         description="cubids-purge: purge associations from the dataset",
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
@@ -1006,62 +489,21 @@ def cubids_purge():
         action="store",
         help="Docker image tag or Singularity image file.",
     )
-    opts = parser.parse_args()
-
-    # Run directly from python using
-    if opts.container is None:
-        bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=opts.use_datalad)
-        if opts.use_datalad:
-            if not bod.is_datalad_clean():
-                raise Exception("Untracked change in " + str(opts.bids_dir))
-        bod.purge(str(opts.scans))
-        sys.exit(0)
+    return parser
 
-    # Run it through a container
-    container_type = _get_container_type(opts.container)
-    bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids"
-    input_scans_link = str(opts.scans.parent.absolute()) + ":/in_scans:ro"
-    if container_type == "docker":
-        cmd = [
-            "docker",
-            "run",
-            "--rm",
-            "-v",
-            bids_dir_link,
-            "-v",
-            GIT_CONFIG + ":/root/.gitconfig",
-            "-v",
-            input_scans_link,
-            "--entrypoint",
-            "cubids-purge",
-            opts.container,
-            "/bids",
-            input_scans_link,
-        ]
 
-    elif container_type == "singularity":
-        cmd = [
-            "singularity",
-            "exec",
-            "--cleanenv",
-            "-B",
-            bids_dir_link,
-            "-B",
-            input_scans_link,
-            opts.container,
-            "cubids-purge",
-            "/bids",
-            input_scans_link,
-        ]
-    print("RUNNING: " + " ".join(cmd))
-    if opts.use_datalad:
-        cmd.append("--use-datalad")
-    proc = subprocess.run(cmd)
-    sys.exit(proc.returncode)
+def _enter_purge(argv=None):
+    warnings.warn(
+        "cubids-purge is deprecated and will be removed in the future. Please use cubids purge.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    options = _parse_purge().parse_args(argv)
+    args = vars(options).copy()
+    workflows.purge(**args)
 
 
-def cubids_remove_metadata_fields():
-    """Delete fields from metadata."""
+def _parse_remove_metadata_fields():
     parser = argparse.ArgumentParser(
         description="cubids-remove-metadata-fields: delete fields from metadata",
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
@@ -1087,49 +529,23 @@ def cubids_remove_metadata_fields():
         action="store",
         help="Docker image tag or Singularity image file.",
     )
-    opts = parser.parse_args()
 
-    # Run directly from python
-    if opts.container is None:
-        bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=False)
-        bod.remove_metadata_fields(opts.fields)
-        sys.exit(0)
+    return parser
+
 
-    # Run it through a container
-    container_type = _get_container_type(opts.container)
-    bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids:rw"
-    if container_type == "docker":
-        cmd = [
-            "docker",
-            "run",
-            "--rm",
-            "-v",
-            bids_dir_link,
-            "--entrypoint",
-            "cubids-remove-metadata-fields",
-            opts.container,
-            "/bids",
-            "--fields",
-        ] + opts.fields
-    elif container_type == "singularity":
-        cmd = [
-            "singularity",
-            "exec",
-            "--cleanenv",
-            "-B",
-            bids_dir_link,
-            opts.container,
-            "cubids-remove-metadata-fields",
-            "/bids",
-            "--fields",
-        ] + opts.fields
-    print("RUNNING: " + " ".join(cmd))
-    proc = subprocess.run(cmd)
-    sys.exit(proc.returncode)
+def _enter_remove_metadata_fields(argv=None):
+    warnings.warn(
+        "cubids-remove-metadata-fields is deprecated and will be removed in the future. "
+        "Please use cubids remove-metadata-fields.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    options = _parse_remove_metadata_fields().parse_args(argv)
+    args = vars(options).copy()
+    workflows.remove_metadata_fields(**args)
 
 
-def cubids_print_metadata_fields():
-    """Print unique metadata fields."""
+def _parse_print_metadata_fields():
     parser = argparse.ArgumentParser(
         description="cubids-print-metadata-fields: print all unique metadata fields",
         formatter_class=argparse.ArgumentDefaultsHelpFormatter,
@@ -1148,54 +564,61 @@ def cubids_print_metadata_fields():
         action="store",
         help="Docker image tag or Singularity image file.",
     )
-    opts = parser.parse_args()
-
-    # Run directly from python
-    if opts.container is None:
-        bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=False)
-        fields = bod.get_all_metadata_fields()
-        print("\n".join(fields))
-        sys.exit(0)
-
-    # Run it through a container
-    container_type = _get_container_type(opts.container)
-    bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids:ro"
-    if container_type == "docker":
-        cmd = [
-            "docker",
-            "run",
-            "--rm",
-            "-v",
-            bids_dir_link,
-            "--entrypoint",
-            "cubids-print-metadata-fields",
-            opts.container,
-            "/bids",
-        ]
-    elif container_type == "singularity":
-        cmd = [
-            "singularity",
-            "exec",
-            "--cleanenv",
-            "-B",
-            bids_dir_link,
-            opts.container,
-            "cubids-print-metadata-fields",
-            "/bids",
-        ]
-    print("RUNNING: " + " ".join(cmd))
-    proc = subprocess.run(cmd)
-    sys.exit(proc.returncode)
 
+    return parser
+
+
+def _enter_print_metadata_fields(argv=None):
+    options = _parse_print_metadata_fields().parse_args(argv)
+    args = vars(options).copy()
+    warnings.warn(
+        "cubids-print-metadata-fields is deprecated and will be removed in the future. "
+        "Please use cubids print-metadata-fields.",
+        DeprecationWarning,
+        stacklevel=2,
+    )
+    workflows.print_metadata_fields(**args)
+
+
+COMMANDS = [
+    ("validate", _parse_validate, workflows.validate),
+    ("sidecar-merge", _parse_bids_sidecar_merge, workflows.bids_sidecar_merge),
+    ("group", _parse_group, workflows.group),
+    ("apply", _parse_apply, workflows.apply),
+    ("purge", _parse_purge, workflows.purge),
+    ("add-nifti-info", _parse_add_nifti_info, workflows.add_nifti_info),
+    ("copy-exemplars", _parse_copy_exemplars, workflows.copy_exemplars),
+    ("undo", _parse_undo, workflows.undo),
+    ("datalad-save", _parse_datalad_save, workflows.datalad_save),
+    ("print-metadata-fields", _parse_print_metadata_fields, workflows.print_metadata_fields),
+    ("remove-metadata-fields", _parse_remove_metadata_fields, workflows.remove_metadata_fields),
+]
+
+
+def _get_parser():
+    """Create the general "cubids" parser object."""
+    from cubids import __version__
+
+    parser = argparse.ArgumentParser(prog="cubids")
+    parser.add_argument("-v", "--version", action="version", version=__version__)
+    subparsers = parser.add_subparsers(help="CuBIDS commands")
+
+    for command, parser_func, run_func in COMMANDS:
+        subparser = parser_func()
+        subparser.set_defaults(func=run_func)
+        subparsers.add_parser(
+            command,
+            parents=[subparser],
+            help=subparser.description,
+            add_help=False,
+        )
 
-def _get_container_type(image_name):
-    """Get and return the container type."""
-    # If it's a file on disk, it must be a singularity image
-    if Path(image_name).exists():
-        return "singularity"
+    return parser
 
-    # It needs to match a docker tag pattern to be docker
-    if re.match(r"(?:.+\/)?([^:]+)(?::.+)?", image_name):
-        return "docker"
 
-    raise Exception("Unable to determine the container type of " + image_name)
+def _main(argv=None):
+    """Set entrypoint for "cubids" CLI."""
+    options = _get_parser().parse_args(argv)
+    args = vars(options).copy()
+    args.pop("func")
+    options.func(**args)
diff --git a/cubids/utils.py b/cubids/utils.py
new file mode 100644
index 000000000..56704d8c6
--- /dev/null
+++ b/cubids/utils.py
@@ -0,0 +1,16 @@
+"""Miscellaneous utility functions for CuBIDS."""
+import re
+from pathlib import Path
+
+
+def _get_container_type(image_name):
+    """Get and return the container type."""
+    # If it's a file on disk, it must be a singularity image
+    if Path(image_name).exists():
+        return "singularity"
+
+    # It needs to match a docker tag pattern to be docker
+    if re.match(r"(?:.+\/)?([^:]+)(?::.+)?", image_name):
+        return "docker"
+
+    raise Exception("Unable to determine the container type of " + image_name)
diff --git a/cubids/workflows.py b/cubids/workflows.py
new file mode 100644
index 000000000..eea9bfa50
--- /dev/null
+++ b/cubids/workflows.py
@@ -0,0 +1,900 @@
+"""First order workflows in CuBIDS."""
+import json
+import logging
+import os
+import shutil
+import subprocess
+import sys
+import tempfile
+import warnings
+from pathlib import Path
+
+import pandas as pd
+import tqdm
+
+from cubids import CuBIDS
+from cubids.metadata_merge import merge_json_into_json
+from cubids.utils import _get_container_type
+from cubids.validator import (
+    build_subject_paths,
+    build_validator_call,
+    get_val_dictionary,
+    parse_validator_output,
+    run_validator,
+)
+
+warnings.simplefilter(action="ignore", category=FutureWarning)
+logging.basicConfig(level=logging.INFO)
+logger = logging.getLogger("cubids-cli")
+GIT_CONFIG = os.path.join(os.path.expanduser("~"), ".gitconfig")
+logging.getLogger("datalad").setLevel(logging.ERROR)
+
+
+def validate(
+    bids_dir,
+    output_prefix,
+    container,
+    sequential,
+    sequential_subjects,
+    ignore_nifti_headers,
+    ignore_subject_consistency,
+):
+    """Run the bids validator.
+
+    Parameters
+    ----------
+    bids_dir
+    output_prefix
+    container
+    sequential
+    sequential_subjects
+    ignore_nifti_headers
+    ignore_subject_consistency
+    """
+    # check status of output_prefix, absolute or relative?
+    abs_path_output = True
+    if "/" not in str(output_prefix):
+        # not an absolute path --> put in code/CuBIDS dir
+        abs_path_output = False
+        # check if code/CuBIDS dir exists
+        if not Path(str(bids_dir) + "/code/CuBIDS").is_dir():
+            # if not, create it
+            subprocess.run(["mkdir", str(bids_dir) + "/code"])
+            subprocess.run(["mkdir", str(bids_dir) + "/code/CuBIDS/"])
+
+    # Run directly from python using subprocess
+    if container is None:
+        if not sequential:
+            # run on full dataset
+            call = build_validator_call(
+                str(bids_dir),
+                ignore_nifti_headers,
+                ignore_subject_consistency,
+            )
+            ret = run_validator(call)
+
+            # parse the string output
+            parsed = parse_validator_output(ret.stdout.decode("UTF-8"))
+            if parsed.shape[1] < 1:
+                logger.info("No issues/warnings parsed, your dataset is BIDS valid.")
+                sys.exit(0)
+            else:
+                logger.info("BIDS issues/warnings found in the dataset")
+
+                if output_prefix:
+                    # check if absolute or relative path
+                    if abs_path_output:
+                        # normally, write dataframe to file in CLI
+                        val_tsv = str(output_prefix) + "_validation.tsv"
+
+                    else:
+                        val_tsv = (
+                            str(bids_dir)
+                            + "/code/CuBIDS/"
+                            + str(output_prefix)
+                            + "_validation.tsv"
+                        )
+
+                    parsed.to_csv(val_tsv, sep="\t", index=False)
+
+                    # build validation data dictionary json sidecar
+                    val_dict = get_val_dictionary()
+                    val_json = val_tsv.replace("tsv", "json")
+                    with open(val_json, "w") as outfile:
+                        json.dump(val_dict, outfile, indent=4)
+
+                    logger.info("Writing issues out to %s", val_tsv)
+                    sys.exit(0)
+                else:
+                    # user may be in python session, return dataframe
+                    return parsed
+        else:
+            # logger.info("Prepping sequential validator run...")
+
+            # build a dictionary with {SubjectLabel: [List of files]}
+            subjects_dict = build_subject_paths(bids_dir)
+
+            # logger.info("Running validator sequentially...")
+            # iterate over the dictionary
+
+            parsed = []
+
+            if sequential_subjects:
+                subjects_dict = {
+                    k: v for k, v in subjects_dict.items() if k in sequential_subjects
+                }
+            assert len(list(subjects_dict.keys())) > 1, "No subjects found in filter"
+            for subject, files_list in tqdm.tqdm(subjects_dict.items()):
+                # logger.info(" ".join(["Processing subject:", subject]))
+                # create a temporary directory and symlink the data
+                with tempfile.TemporaryDirectory() as tmpdirname:
+                    for fi in files_list:
+                        # cut the path down to the subject label
+                        bids_start = fi.find(subject)
+
+                        # maybe it's a single file
+                        if bids_start < 1:
+                            bids_folder = tmpdirname
+                            fi_tmpdir = tmpdirname
+
+                        else:
+                            bids_folder = Path(fi[bids_start:]).parent
+                            fi_tmpdir = tmpdirname + "/" + str(bids_folder)
+
+                        if not os.path.exists(fi_tmpdir):
+                            os.makedirs(fi_tmpdir)
+                        output = fi_tmpdir + "/" + str(Path(fi).name)
+                        shutil.copy2(fi, output)
+
+                    # run the validator
+                    nifti_head = ignore_nifti_headers
+                    subj_consist = ignore_subject_consistency
+                    call = build_validator_call(tmpdirname, nifti_head, subj_consist)
+                    ret = run_validator(call)
+                    # parse output
+                    if ret.returncode != 0:
+                        logger.error("Errors returned from validator run, parsing now")
+
+                    # parse the output and add to list if it returns a df
+                    decoded = ret.stdout.decode("UTF-8")
+                    tmp_parse = parse_validator_output(decoded)
+                    if tmp_parse.shape[1] > 1:
+                        tmp_parse["subject"] = subject
+                        parsed.append(tmp_parse)
+
+            # concatenate the parsed data and exit
+            if len(parsed) < 1:
+                logger.info("No issues/warnings parsed, your dataset is BIDS valid.")
+                sys.exit(0)
+
+            else:
+                parsed = pd.concat(parsed, axis=0)
+                subset = parsed.columns.difference(["subject"])
+                parsed = parsed.drop_duplicates(subset=subset)
+
+                logger.info("BIDS issues/warnings found in the dataset")
+
+                if output_prefix:
+                    # normally, write dataframe to file in CLI
+                    if abs_path_output:
+                        val_tsv = str(output_prefix) + "_validation.tsv"
+                    else:
+                        val_tsv = (
+                            str(bids_dir)
+                            + "/code/CuBIDS/"
+                            + str(output_prefix)
+                            + "_validation.tsv"
+                        )
+
+                    parsed.to_csv(val_tsv, sep="\t", index=False)
+
+                    # build validation data dictionary json sidecar
+                    val_dict = get_val_dictionary()
+                    val_json = val_tsv.replace("tsv", "json")
+                    with open(val_json, "w") as outfile:
+                        json.dump(val_dict, outfile, indent=4)
+
+                    logger.info("Writing issues out to file %s", val_tsv)
+                    sys.exit(0)
+                else:
+                    # user may be in python session, return dataframe
+                    return parsed
+
+    # Run it through a container
+    container_type = _get_container_type(container)
+    bids_dir_link = str(bids_dir.absolute()) + ":/bids:ro"
+    output_dir_link_t = str(output_prefix.parent.absolute()) + ":/tsv:rw"
+    output_dir_link_j = str(output_prefix.parent.absolute()) + ":/json:rw"
+    linked_output_prefix_t = "/tsv/" + output_prefix.name
+    if container_type == "docker":
+        cmd = [
+            "docker",
+            "run",
+            "--rm",
+            "-v",
+            bids_dir_link,
+            "-v",
+            GIT_CONFIG + ":/root/.gitconfig",
+            "-v",
+            output_dir_link_t,
+            "-v",
+            output_dir_link_j,
+            "--entrypoint",
+            "cubids-validate",
+            container,
+            "/bids",
+            linked_output_prefix_t,
+        ]
+        if ignore_nifti_headers:
+            cmd.append("--ignore_nifti_headers")
+
+        if ignore_subject_consistency:
+            cmd.append("--ignore_subject_consistency")
+
+    elif container_type == "singularity":
+        cmd = [
+            "singularity",
+            "exec",
+            "--cleanenv",
+            "-B",
+            bids_dir_link,
+            "-B",
+            output_dir_link_t,
+            "-B",
+            output_dir_link_j,
+            container,
+            "cubids-validate",
+            "/bids",
+            linked_output_prefix_t,
+        ]
+        if ignore_nifti_headers:
+            cmd.append("--ignore_nifti_headers")
+
+        if ignore_subject_consistency:
+            cmd.append("--ignore_subject_consistency")
+
+        if sequential:
+            cmd.append("--sequential")
+
+    logger.info("RUNNING: " + " ".join(cmd))
+    proc = subprocess.run(cmd)
+    sys.exit(proc.returncode)
+
+
+def bids_sidecar_merge(from_json, to_json):
+    """Merge critical keys from one sidecar to another."""
+    merge_status = merge_json_into_json(from_json, to_json, raise_on_error=False)
+    sys.exit(merge_status)
+
+
+def group(bids_dir, container, acq_group_level, config, output_prefix):
+    """Find key and param groups.
+
+    Parameters
+    ----------
+    bids_dir
+    container
+    acq_group_level
+    config
+    output_prefix
+    """
+    # Run directly from python using
+    if container is None:
+        bod = CuBIDS(
+            data_root=str(bids_dir),
+            acq_group_level=acq_group_level,
+            grouping_config=config,
+        )
+        bod.get_tsvs(
+            str(output_prefix),
+        )
+        sys.exit(0)
+
+    # Run it through a container
+    container_type = _get_container_type(container)
+    bids_dir_link = str(bids_dir.absolute()) + ":/bids"
+    output_dir_link = str(output_prefix.parent.absolute()) + ":/tsv:rw"
+
+    apply_config = config is not None
+    if apply_config:
+        input_config_dir_link = str(config.parent.absolute()) + ":/in_config:ro"
+        linked_input_config = "/in_config/" + config.name
+
+    linked_output_prefix = "/tsv/" + output_prefix.name
+    if container_type == "docker":
+        cmd = [
+            "docker",
+            "run",
+            "--rm",
+            "-v",
+            bids_dir_link,
+            "-v",
+            GIT_CONFIG + ":/root/.gitconfig",
+            "-v",
+            output_dir_link,
+            "--entrypoint",
+            "cubids-group",
+            container,
+            "/bids",
+            linked_output_prefix,
+        ]
+        if apply_config:
+            cmd.insert(3, "-v")
+            cmd.insert(4, input_config_dir_link)
+            cmd += ["--config", linked_input_config]
+
+    elif container_type == "singularity":
+        cmd = [
+            "singularity",
+            "exec",
+            "--cleanenv",
+            "-B",
+            bids_dir_link,
+            "-B",
+            output_dir_link,
+            container,
+            "cubids-group",
+            "/bids",
+            linked_output_prefix,
+        ]
+        if apply_config:
+            cmd.insert(3, "-B")
+            cmd.insert(4, input_config_dir_link)
+            cmd += ["--config", linked_input_config]
+
+    if acq_group_level:
+        cmd.append("--acq-group-level")
+        cmd.append(str(acq_group_level))
+
+    logger.info("RUNNING: " + " ".join(cmd))
+    proc = subprocess.run(cmd)
+    sys.exit(proc.returncode)
+
+
+def apply(
+    bids_dir,
+    use_datalad,
+    acq_group_level,
+    config,
+    edited_summary_tsv,
+    edited_tsv_prefix,
+    files_tsv,
+    new_tsv_prefix,
+    output_prefix,
+    container,
+):
+    """Apply the tsv changes.
+
+    Parameters
+    ----------
+    bids_dir
+    use_datalad
+    acq_group_level
+    config
+    edited_summary_tsv
+    edited_tsv_prefix
+    files_tsv
+    new_tsv_prefix
+    output_prefix
+    container
+    """
+    # Run directly from python using
+    if container is None:
+        bod = CuBIDS(
+            data_root=str(bids_dir),
+            use_datalad=use_datalad,
+            acq_group_level=acq_group_level,
+            grouping_config=config,
+        )
+        if use_datalad:
+            if not bod.is_datalad_clean():
+                raise Exception("Untracked change in " + str(bids_dir))
+        bod.apply_tsv_changes(
+            str(edited_summary_tsv),
+            str(files_tsv),
+            str(new_tsv_prefix),
+            raise_on_error=False,
+        )
+        sys.exit(0)
+
+    # Run it through a container
+    container_type = _get_container_type(container)
+    bids_dir_link = str(bids_dir.absolute()) + ":/bids"
+    input_summary_tsv_dir_link = str(edited_tsv_prefix.parent.absolute()) + ":/in_summary_tsv:ro"
+    input_files_tsv_dir_link = str(edited_tsv_prefix.parent.absolute()) + ":/in_files_tsv:ro"
+    output_tsv_dir_link = str(new_tsv_prefix.parent.absolute()) + ":/out_tsv:rw"
+
+    # FROM BOND-GROUP
+    apply_config = config is not None
+    if apply_config:
+        input_config_dir_link = str(config.parent.absolute()) + ":/in_config:ro"
+        linked_input_config = "/in_config/" + config.name
+
+    linked_output_prefix = "/tsv/" + output_prefix.name
+
+    ####
+    linked_input_summary_tsv = "/in_summary_tsv/" + edited_summary_tsv.name
+    linked_input_files_tsv = "/in_files_tsv/" + files_tsv.name
+    linked_output_prefix = "/out_tsv/" + new_tsv_prefix.name
+    if container_type == "docker":
+        cmd = [
+            "docker",
+            "run",
+            "--rm",
+            "-v",
+            bids_dir_link,
+            "-v",
+            GIT_CONFIG + ":/root/.gitconfig",
+            "-v",
+            input_summary_tsv_dir_link,
+            "-v",
+            input_files_tsv_dir_link,
+            "-v",
+            output_tsv_dir_link,
+            "--entrypoint",
+            "cubids-apply",
+            container,
+            "/bids",
+            linked_input_summary_tsv,
+            linked_input_files_tsv,
+            linked_output_prefix,
+        ]
+        if apply_config:
+            cmd.insert(3, "-v")
+            cmd.insert(4, input_config_dir_link)
+            cmd += ["--config", linked_input_config]
+
+    elif container_type == "singularity":
+        cmd = [
+            "singularity",
+            "exec",
+            "--cleanenv",
+            "-B",
+            bids_dir_link,
+            "-B",
+            input_summary_tsv_dir_link,
+            "-B",
+            input_files_tsv_dir_link,
+            "-B",
+            output_tsv_dir_link,
+            container,
+            "cubids-apply",
+            "/bids",
+            linked_input_summary_tsv,
+            linked_input_files_tsv,
+            linked_output_prefix,
+        ]
+        if apply_config:
+            cmd.insert(3, "-B")
+            cmd.insert(4, input_config_dir_link)
+            cmd += ["--config", linked_input_config]
+
+    if use_datalad:
+        cmd.append("--use-datalad")
+
+    if acq_group_level:
+        cmd.append("--acq-group-level")
+        cmd.append(str(acq_group_level))
+
+    logger.info("RUNNING: " + " ".join(cmd))
+    proc = subprocess.run(cmd)
+    sys.exit(proc.returncode)
+
+
+def datalad_save(
+    bids_dir,
+    container,
+    m,
+):
+    """Perform datalad save.
+
+    Parameters
+    ----------
+    bids_dir
+    container
+    m
+    """
+    # Run directly from python using
+    if container is None:
+        bod = CuBIDS(data_root=str(bids_dir), use_datalad=True)
+        bod.datalad_save(message=m)
+        sys.exit(0)
+
+    # Run it through a container
+    container_type = _get_container_type(container)
+    bids_dir_link = str(bids_dir.absolute()) + ":/bids"
+    if container_type == "docker":
+        cmd = [
+            "docker",
+            "run",
+            "--rm",
+            "-v",
+            bids_dir_link,
+            "-v",
+            GIT_CONFIG + ":/root/.gitconfig",
+            "--entrypoint",
+            "cubids-datalad-save",
+            container,
+            "/bids",
+            "-m",
+            m,
+        ]
+    elif container_type == "singularity":
+        cmd = [
+            "singularity",
+            "exec",
+            "--cleanenv",
+            "-B",
+            bids_dir_link,
+            container,
+            "cubids-datalad-save",
+            "/bids",
+            "-m",
+            m,
+        ]
+    logger.info("RUNNING: " + " ".join(cmd))
+    proc = subprocess.run(cmd)
+    sys.exit(proc.returncode)
+
+
+def undo(bids_dir, container):
+    """Revert the most recent commit.
+
+    Parameters
+    ----------
+    bids_dir
+    container
+    """
+    # Run directly from python using
+    if container is None:
+        bod = CuBIDS(data_root=str(bids_dir), use_datalad=True)
+        bod.datalad_undo_last_commit()
+        sys.exit(0)
+
+    # Run it through a container
+    container_type = _get_container_type(container)
+    bids_dir_link = str(bids_dir.absolute()) + ":/bids"
+    if container_type == "docker":
+        cmd = [
+            "docker",
+            "run",
+            "--rm",
+            "-v",
+            bids_dir_link,
+            "-v",
+            GIT_CONFIG + ":/root/.gitconfig",
+            "--entrypoint",
+            "cubids-undo",
+            container,
+            "/bids",
+        ]
+    elif container_type == "singularity":
+        cmd = [
+            "singularity",
+            "exec",
+            "--cleanenv",
+            "-B",
+            bids_dir_link,
+            container,
+            "cubids-undo",
+            "/bids",
+        ]
+    logger.info("RUNNING: " + " ".join(cmd))
+    proc = subprocess.run(cmd)
+    sys.exit(proc.returncode)
+
+
+def copy_exemplars(
+    bids_dir,
+    container,
+    use_datalad,
+    exemplars_dir,
+    exemplars_tsv,
+    min_group_size,
+    force_unlock,
+):
+    """Create and save a directory with one subject from each acquisition group.
+
+    Parameters
+    ----------
+    bids_dir
+    container
+    use_datalad
+    exemplars_dir
+    exemplars_tsv
+    min_group_size
+    force_unlock
+    """
+    # Run directly from python using
+    if container is None:
+        bod = CuBIDS(data_root=str(bids_dir), use_datalad=use_datalad)
+        if use_datalad:
+            if not bod.is_datalad_clean():
+                raise Exception(
+                    "Untracked changes. Need to save "
+                    + str(bids_dir)
+                    + " before coyping exemplars"
+                )
+        bod.copy_exemplars(
+            str(exemplars_dir),
+            str(exemplars_tsv),
+            min_group_size=min_group_size,
+        )
+        sys.exit(0)
+
+    # Run it through a container
+    container_type = _get_container_type(container)
+    bids_dir_link = str(bids_dir.absolute()) + ":/bids:ro"
+    exemplars_dir_link = str(exemplars_dir.absolute()) + ":/exemplars:ro"
+    exemplars_tsv_link = str(exemplars_tsv.absolute()) + ":/in_tsv:ro"
+    if container_type == "docker":
+        cmd = [
+            "docker",
+            "run",
+            "--rm",
+            "-v",
+            bids_dir_link,
+            "-v",
+            exemplars_dir_link,
+            "-v",
+            GIT_CONFIG + ":/root/.gitconfig",
+            "-v",
+            exemplars_tsv_link,
+            "--entrypoint",
+            "cubids-copy-exemplars",
+            container,
+            "/bids",
+            "/exemplars",
+            "/in_tsv",
+        ]
+
+        if force_unlock:
+            cmd.append("--force-unlock")
+        if min_group_size:
+            cmd.append("--min-group-size")
+    elif container_type == "singularity":
+        cmd = [
+            "singularity",
+            "exec",
+            "--cleanenv",
+            "-B",
+            bids_dir_link,
+            "-B",
+            exemplars_dir_link,
+            "-B",
+            exemplars_tsv_link,
+            container,
+            "cubids-copy-exemplars",
+            "/bids",
+            "/exemplars",
+            "/in_tsv",
+        ]
+        if force_unlock:
+            cmd.append("--force-unlock")
+
+        if min_group_size:
+            cmd.append("--min-group-size")
+
+    logger.info("RUNNING: " + " ".join(cmd))
+    proc = subprocess.run(cmd)
+    sys.exit(proc.returncode)
+
+
+def add_nifti_info(bids_dir, container, use_datalad, force_unlock):
+    """Add information from nifti files to the dataset's sidecars.
+
+    Parameters
+    ----------
+    bids_dir
+    container
+    use_datalad
+    force_unlock
+    """
+    # Run directly from python using
+    if container is None:
+        bod = CuBIDS(
+            data_root=str(bids_dir),
+            use_datalad=use_datalad,
+            force_unlock=force_unlock,
+        )
+        if use_datalad:
+            if not bod.is_datalad_clean():
+                raise Exception("Untracked change in " + str(bids_dir))
+            # if bod.is_datalad_clean() and not force_unlock:
+            #     raise Exception("Need to unlock " + str(bids_dir))
+        bod.add_nifti_info()
+        sys.exit(0)
+
+    # Run it through a container
+    container_type = _get_container_type(container)
+    bids_dir_link = str(bids_dir.absolute()) + ":/bids:ro"
+    if container_type == "docker":
+        cmd = [
+            "docker",
+            "run",
+            "--rm",
+            "-v",
+            bids_dir_link,
+            "-v",
+            GIT_CONFIG + ":/root/.gitconfig",
+            "--entrypoint",
+            "cubids-add-nifti-info",
+            container,
+            "/bids",
+        ]
+
+        if force_unlock:
+            cmd.append("--force-unlock")
+    elif container_type == "singularity":
+        cmd = [
+            "singularity",
+            "exec",
+            "--cleanenv",
+            "-B",
+            bids_dir_link,
+            container,
+            "cubids-add-nifti-info",
+            "/bids",
+        ]
+        if force_unlock:
+            cmd.append("--force-unlock")
+
+    logger.info("RUNNING: " + " ".join(cmd))
+    proc = subprocess.run(cmd)
+    sys.exit(proc.returncode)
+
+
+def purge(bids_dir, container, use_datalad, scans):
+    """Purge scan associations.
+
+    Parameters
+    ----------
+    bids_dir
+    container
+    use_datalad
+    scans
+    """
+    # Run directly from python using
+    if container is None:
+        bod = CuBIDS(data_root=str(bids_dir), use_datalad=use_datalad)
+        if use_datalad:
+            if not bod.is_datalad_clean():
+                raise Exception("Untracked change in " + str(bids_dir))
+        bod.purge(str(scans))
+        sys.exit(0)
+
+    # Run it through a container
+    container_type = _get_container_type(container)
+    bids_dir_link = str(bids_dir.absolute()) + ":/bids"
+    input_scans_link = str(scans.parent.absolute()) + ":/in_scans:ro"
+    if container_type == "docker":
+        cmd = [
+            "docker",
+            "run",
+            "--rm",
+            "-v",
+            bids_dir_link,
+            "-v",
+            GIT_CONFIG + ":/root/.gitconfig",
+            "-v",
+            input_scans_link,
+            "--entrypoint",
+            "cubids-purge",
+            container,
+            "/bids",
+            input_scans_link,
+        ]
+
+    elif container_type == "singularity":
+        cmd = [
+            "singularity",
+            "exec",
+            "--cleanenv",
+            "-B",
+            bids_dir_link,
+            "-B",
+            input_scans_link,
+            container,
+            "cubids-purge",
+            "/bids",
+            input_scans_link,
+        ]
+    logger.info("RUNNING: " + " ".join(cmd))
+    if use_datalad:
+        cmd.append("--use-datalad")
+    proc = subprocess.run(cmd)
+    sys.exit(proc.returncode)
+
+
+def remove_metadata_fields(bids_dir, container, fields):
+    """Delete fields from metadata.
+
+    Parameters
+    ----------
+    bids_dir
+    container
+    fields
+    """
+    # Run directly from python
+    if container is None:
+        bod = CuBIDS(data_root=str(bids_dir), use_datalad=False)
+        bod.remove_metadata_fields(fields)
+        sys.exit(0)
+
+    # Run it through a container
+    container_type = _get_container_type(container)
+    bids_dir_link = str(bids_dir.absolute()) + ":/bids:rw"
+    if container_type == "docker":
+        cmd = [
+            "docker",
+            "run",
+            "--rm",
+            "-v",
+            bids_dir_link,
+            "--entrypoint",
+            "cubids-remove-metadata-fields",
+            container,
+            "/bids",
+            "--fields",
+        ] + fields
+    elif container_type == "singularity":
+        cmd = [
+            "singularity",
+            "exec",
+            "--cleanenv",
+            "-B",
+            bids_dir_link,
+            container,
+            "cubids-remove-metadata-fields",
+            "/bids",
+            "--fields",
+        ] + fields
+    logger.info("RUNNING: " + " ".join(cmd))
+    proc = subprocess.run(cmd)
+    sys.exit(proc.returncode)
+
+
+def print_metadata_fields(bids_dir, container):
+    """Print unique metadata fields.
+
+    Parameters
+    ----------
+    bids_dir
+    container
+    """
+    # Run directly from python
+    if container is None:
+        bod = CuBIDS(data_root=str(bids_dir), use_datalad=False)
+        fields = bod.get_all_metadata_fields()
+        logger.info("\n".join(fields))
+        sys.exit(0)
+
+    # Run it through a container
+    container_type = _get_container_type(container)
+    bids_dir_link = str(bids_dir.absolute()) + ":/bids:ro"
+    if container_type == "docker":
+        cmd = [
+            "docker",
+            "run",
+            "--rm",
+            "-v",
+            bids_dir_link,
+            "--entrypoint",
+            "cubids-print-metadata-fields",
+            container,
+            "/bids",
+        ]
+    elif container_type == "singularity":
+        cmd = [
+            "singularity",
+            "exec",
+            "--cleanenv",
+            "-B",
+            bids_dir_link,
+            container,
+            "cubids-print-metadata-fields",
+            "/bids",
+        ]
+    logger.info("RUNNING: " + " ".join(cmd))
+    proc = subprocess.run(cmd)
+    sys.exit(proc.returncode)
diff --git a/docs/usage.rst b/docs/usage.rst
index 1932b683d..e9277781d 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -56,15 +56,15 @@ Acquisition Groups are sets of subjects who's images belong to all the same Key
 Acquisition Group
 ~~~~~~~~~~~~~~~~~~
 
-We define an “Acquisition Group” as a collection of sessions across participants that contain the exact 
-same set of Key and Parameter Groups. Since Key Groups are based on the BIDS filenames—and therefore both 
-MRI image type and acquisition specific—each BIDS session directory contains images that belong to a set of 
-Parameter Groups. CuBIDS assigns each session––or set of Parameter Groups––to an Acquisition Group 
-such that all sessions in an Acquisition Group possesses an identical set of scan acquisitions and 
-metadata parameters across all image modalities present in the dataset. We find Acquisition Groups to be 
-a particularly useful categorization of BIDS data, as they identify homogeneous sets of sessions (not 
-individual scans) in a large dataset. They are also useful for expediting the testing of pipelines; if a 
-BIDS App runs successfully on a single subject from each Acquisition Group, one can be confident that it 
+We define an “Acquisition Group” as a collection of sessions across participants that contain the exact
+same set of Key and Parameter Groups. Since Key Groups are based on the BIDS filenames—and therefore both
+MRI image type and acquisition specific—each BIDS session directory contains images that belong to a set of
+Parameter Groups. CuBIDS assigns each session––or set of Parameter Groups––to an Acquisition Group
+such that all sessions in an Acquisition Group possesses an identical set of scan acquisitions and
+metadata parameters across all image modalities present in the dataset. We find Acquisition Groups to be
+a particularly useful categorization of BIDS data, as they identify homogeneous sets of sessions (not
+individual scans) in a large dataset. They are also useful for expediting the testing of pipelines; if a
+BIDS App runs successfully on a single subject from each Acquisition Group, one can be confident that it
 will handle all combinations of scanning parameters in the entire dataset.
 
 .. _summaryfile:
@@ -112,7 +112,7 @@ Once the columns have been edited you can apply the changes to BIDS data using
 
 The changes in ``keyparam_edited_summary.csv`` will be applied to the BIDS data in ``/bids/dir``
 and the new Key and Parameter groups will be saved to csv files starting with ``new_keyparam_prefix``. Note:
-fieldmaps keygroups with variant parameters will be identified but not renamed. 
+fieldmaps keygroups with variant parameters will be identified but not renamed.
 
 
 
@@ -139,31 +139,31 @@ Use ``cubids-group`` to generate your dataset's Key Groups and Parameter Groups:
 
     $ cubids-group FULL/PATH/TO/BIDS/DIR FULL/PATH/TO/v0
 
-This will output four files, including the summary and files tsvs described above, 
+This will output four files, including the summary and files tsvs described above,
 prefixed by the second argument ``v0``.
 
-Applying changes 
+Applying changes
 ------------------
 
-The ``cubids-apply`` program provides an easy way for users to manipulate their datasets. 
-Specifically, ``cubids-apply`` can rename files according to the users’ specification in a tracked 
-and organized way. Here, the summary.tsv functions as an interface modifications; users can mark 
-``Parameter Groups`` they want to rename (or delete) in a dedicated column of the summary.tsv and 
+The ``cubids-apply`` program provides an easy way for users to manipulate their datasets.
+Specifically, ``cubids-apply`` can rename files according to the users’ specification in a tracked
+and organized way. Here, the summary.tsv functions as an interface modifications; users can mark
+``Parameter Groups`` they want to rename (or delete) in a dedicated column of the summary.tsv and
 pass that edited tsv as an argument to ``cubids-apply``.
 
 Detecting Variant Groups
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Additionally, cubids-apply can automatically rename files in ``Variant Groups`` based on their 
-scanning parameters that vary from those in their Key Groups’ Dominant Parameter Groups. Renaming 
-is automatically suggested when the summary.tsv is generated from a cubids-group run, with the suggested 
-new name listed in the tsv’s “Rename Key Group” column. CuBIDS populates this column for all Variant 
-Groups—e.g., every Parameter Group except the Dominant one. Specifically, CuBIDS will suggest renaming 
-all non-dominant Parameter Group to include VARIANT* in their acquisition field where * is the reason 
-the Parameter Group varies from the Dominant Group. For example, when CuBIDS encounters a Parameter 
-Group with a repetition time that varies from the one present in the Dominant Group, it will automatically 
-suggest renaming all scans in that Variant Group to include ``acquisition-VARIANTRepetitionTime`` in their 
-filenames. When the user runs ``cubids-apply``, filenames will get renamed according to the auto-generated 
+Additionally, cubids-apply can automatically rename files in ``Variant Groups`` based on their
+scanning parameters that vary from those in their Key Groups’ Dominant Parameter Groups. Renaming
+is automatically suggested when the summary.tsv is generated from a cubids-group run, with the suggested
+new name listed in the tsv’s “Rename Key Group” column. CuBIDS populates this column for all Variant
+Groups—e.g., every Parameter Group except the Dominant one. Specifically, CuBIDS will suggest renaming
+all non-dominant Parameter Group to include VARIANT* in their acquisition field where * is the reason
+the Parameter Group varies from the Dominant Group. For example, when CuBIDS encounters a Parameter
+Group with a repetition time that varies from the one present in the Dominant Group, it will automatically
+suggest renaming all scans in that Variant Group to include ``acquisition-VARIANTRepetitionTime`` in their
+filenames. When the user runs ``cubids-apply``, filenames will get renamed according to the auto-generated
 names in the “Rename Key Group” column in the summary.tsv
 
 Deleting a mistake
@@ -171,7 +171,7 @@ Deleting a mistake
 
 To remove files in a Parameter Group from your BIDS data, you simply set the ``MergeInto`` value
 to ``0``. We see in our data that there is a strange scan that has a ``RepetitionTime`` of 12.3
-seconds and is also variant with respect to EffectiveEchoSpacing and EchoTime. We elect to remove this scan from 
+seconds and is also variant with respect to EffectiveEchoSpacing and EchoTime. We elect to remove this scan from
 our dataset because we do not want these parameters to affect our analyses.
 To remove these files from your BIDS data, add a ``0`` to ``MergeInto`` and save the new tsv as ``v0_edited_summary.tsv``
 
@@ -195,60 +195,60 @@ Applying these changes we would see:
     :file: _static/PNC_post_apply_summary.csv
     :widths: 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3
     :header-rows: 1
-    
-	
+
+
 Command line tools
 -------------------
 
 With that brief introduction done, we can introduce the full gamut
 of ``CuBIDS`` command line tools:
 
-.. autofunction:: cubids.cli.cubids_add_nifti_info
-.. autofunction:: cubids.cli.cubids_apply
-.. autofunction:: cubids.cli.cubids_copy_exemplars
-.. autofunction:: cubids.cli.cubids_datalad_save
-.. autofunction:: cubids.cli.cubids_group
-.. autofunction:: cubids.cli.cubids_print_metadata_fields
-.. autofunction:: cubids.cli.cubids_purge
-.. autofunction:: cubids.cli.cubids_remove_metadata_fields
-.. autofunction:: cubids.cli.cubids_undo
-.. autofunction:: cubids.cli.cubids_validate
+.. code-block:: bash
+
+	cubids --help
+
+This will print the instructions for using the command line interface in your command line.
+
+.. argparse::
+   :ref: cubids.cli._get_parser
+   :prog: cubids
+   :func: _get_parser
 
 
 Customizable configuration
 ---------------------------
-``CuBIDS`` also features an optional, customizable, MRI image type-specific configuration file. 
-This file can be passed as an argument to cubids-group and cubids-apply using the ``–-config`` flag 
-and allows users to customize grouping settings based on MRI image type and parameter. Each ``Key Group`` 
-is associated with one (and only one) MRI image type, as BIDS filenames include MRI image type-specific values 
-as their suffixes. This easy-to-modify configuration file provides several benefits to curation. 
-First, it allows users to add and remove metadata parameters from the set that determines groupings. 
-This can be very useful if a user deems a specific metadata parameter irrelevant and wishes to collapse 
-variation based on that parameter into a single Parameter Group. Second, the configuration file allows 
-users to apply tolerances for parameters with numerical values. This functionality allows users to avoid 
-very small differences in scanning parameters (i.e., a TR of 3.0s vs 3.0001s) being split into different 
-``Parameter Groups``. Third, the configuration file allows users to determine which scanning parameters 
+``CuBIDS`` also features an optional, customizable, MRI image type-specific configuration file.
+This file can be passed as an argument to cubids-group and cubids-apply using the ``–-config`` flag
+and allows users to customize grouping settings based on MRI image type and parameter. Each ``Key Group``
+is associated with one (and only one) MRI image type, as BIDS filenames include MRI image type-specific values
+as their suffixes. This easy-to-modify configuration file provides several benefits to curation.
+First, it allows users to add and remove metadata parameters from the set that determines groupings.
+This can be very useful if a user deems a specific metadata parameter irrelevant and wishes to collapse
+variation based on that parameter into a single Parameter Group. Second, the configuration file allows
+users to apply tolerances for parameters with numerical values. This functionality allows users to avoid
+very small differences in scanning parameters (i.e., a TR of 3.0s vs 3.0001s) being split into different
+``Parameter Groups``. Third, the configuration file allows users to determine which scanning parameters
 are listed in the acquisition field when auto-renaming is applied to ``Variant Groups``.
 
 
 Exemplar testing
 -----------------
-In addition to facilitating curation of large, heterogeneous BIDS datasets, ``CuBIDS`` also prepares 
-datasets for testing BIDS Apps. This portion of the ``CuBIDS`` workflow relies on the concept of the 
-Acquisition Group: a set of sessions that have identical scan types and metadata across all imaging 
-modalities present in the session set. Specifically, ``cubids-copy-exemplars`` copies one subject from each 
-Acquisition Group into a separate directory, which we call an ``Exemplar Dataset``. Since the ``Exemplar Dataset`` 
-contains one randomly selected subject from each unique Acquisition Group in the dataset, it will be a 
-valid BIDS dataset that spans the entire metadata parameter space of the full study. If users run 
-``cubids-copy-exemplars`` with the ``–-use-datalad`` flag, the program will ensure that the ``Exemplar Dataset`` 
-is tracked and saved in ``DataLad``. If the user chooses to forgo this flag, the ``Exemplar Dataset`` 
-will be a standard directory located on the filesystem. Once the ``Exemplar Dataset`` has been created, 
-a user can test it with a BIDS App (e.g., fMRIPrep or QSIPrep) to ensure that each unique set of scanning 
-parameters will pass through the pipelines successfully. Because BIDS Apps auto-configure workflows based 
-on the metadata encountered, they will process all scans in each ``Acquisition Group`` in the same way. By 
-first verifying that BIDS Apps perform as intended on the small sub-sample of participants present in the 
-``Exemplar Dataset`` (that spans the full variation of the metadata), users can confidently move forward 
-processing the data of the complete BIDS dataset. 
+In addition to facilitating curation of large, heterogeneous BIDS datasets, ``CuBIDS`` also prepares
+datasets for testing BIDS Apps. This portion of the ``CuBIDS`` workflow relies on the concept of the
+Acquisition Group: a set of sessions that have identical scan types and metadata across all imaging
+modalities present in the session set. Specifically, ``cubids-copy-exemplars`` copies one subject from each
+Acquisition Group into a separate directory, which we call an ``Exemplar Dataset``. Since the ``Exemplar Dataset``
+contains one randomly selected subject from each unique Acquisition Group in the dataset, it will be a
+valid BIDS dataset that spans the entire metadata parameter space of the full study. If users run
+``cubids-copy-exemplars`` with the ``–-use-datalad`` flag, the program will ensure that the ``Exemplar Dataset``
+is tracked and saved in ``DataLad``. If the user chooses to forgo this flag, the ``Exemplar Dataset``
+will be a standard directory located on the filesystem. Once the ``Exemplar Dataset`` has been created,
+a user can test it with a BIDS App (e.g., fMRIPrep or QSIPrep) to ensure that each unique set of scanning
+parameters will pass through the pipelines successfully. Because BIDS Apps auto-configure workflows based
+on the metadata encountered, they will process all scans in each ``Acquisition Group`` in the same way. By
+first verifying that BIDS Apps perform as intended on the small sub-sample of participants present in the
+``Exemplar Dataset`` (that spans the full variation of the metadata), users can confidently move forward
+processing the data of the complete BIDS dataset.
 
 
 In the next section, we'll introduce ``DataLad`` and walk through a real example.
diff --git a/pyproject.toml b/pyproject.toml
index 4378b5538..0c25e9bf6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -76,17 +76,18 @@ maint = [
 all = ["cubids[doc,maint,tests]"]
 
 [project.scripts]
-cubids-group = "cubids.cli:cubids_group"
-cubids-apply = "cubids.cli:cubids_apply"
-cubids-purge = "cubids.cli:cubids_purge"
-cubids-add-nifti-info = "cubids.cli:cubids_add_nifti_info"
-cubids-copy-exemplars = "cubids.cli:cubids_copy_exemplars"
-cubids-undo = "cubids.cli:cubids_undo"
-bids-sidecar-merge = "cubids.cli:bids_sidecar_merge"
-cubids-validate = "cubids.cli:cubids_validate"
-cubids-datalad-save = "cubids.cli:cubids_datalad_save"
-cubids-print-metadata-fields = "cubids.cli:cubids_print_metadata_fields"
-cubids-remove-metadata-fields = "cubids.cli:cubids_remove_metadata_fields"
+cubids = "cubids.cli:_main"
+cubids-group = "cubids.cli:_enter_group"
+cubids-apply = "cubids.cli:_enter_apply"
+cubids-purge = "cubids.cli:_enter_purge"
+cubids-add-nifti-info = "cubids.cli:_enter_add_nifti_info"
+cubids-copy-exemplars = "cubids.cli:_enter_copy_exemplars"
+cubids-undo = "cubids.cli:_enter_undo"
+bids-sidecar-merge = "cubids.cli:_enter_bids_sidecar_merge"
+cubids-validate = "cubids.cli:_enter_validate"
+cubids-datalad-save = "cubids.cli:_enter_datalad_save"
+cubids-print-metadata-fields = "cubids.cli:_enter_print_metadata_fields"
+cubids-remove-metadata-fields = "cubids.cli:_enter_remove_metadata_fields"
 
 #
 # Hatch configurations


Test patch:
diff --git a/CuBIDS_Toy_Dataset_Curation/no_ped.txt b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/no_ped.txt
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/no_ped.txt
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/no_ped.txt
diff --git a/CuBIDS_Toy_Dataset_Curation/too_low_vols.txt b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/too_low_vols.txt
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/too_low_vols.txt
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/too_low_vols.txt
diff --git a/CuBIDS_Toy_Dataset_Curation/v0_AcqGroupInfo.txt b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v0_AcqGroupInfo.txt
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v0_AcqGroupInfo.txt
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v0_AcqGroupInfo.txt
diff --git a/CuBIDS_Toy_Dataset_Curation/v0_AcqGrouping.csv b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v0_AcqGrouping.csv
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v0_AcqGrouping.csv
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v0_AcqGrouping.csv
diff --git a/CuBIDS_Toy_Dataset_Curation/v0_files.csv b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v0_files.csv
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v0_files.csv
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v0_files.csv
diff --git a/CuBIDS_Toy_Dataset_Curation/v0_summary.csv b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v0_summary.csv
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v0_summary.csv
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v0_summary.csv
diff --git a/CuBIDS_Toy_Dataset_Curation/v0_validation.csv b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v0_validation.csv
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v0_validation.csv
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v0_validation.csv
diff --git a/CuBIDS_Toy_Dataset_Curation/v1_AcqGroupInfo.txt b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v1_AcqGroupInfo.txt
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v1_AcqGroupInfo.txt
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v1_AcqGroupInfo.txt
diff --git a/CuBIDS_Toy_Dataset_Curation/v1_AcqGrouping.csv b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v1_AcqGrouping.csv
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v1_AcqGrouping.csv
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v1_AcqGrouping.csv
diff --git a/CuBIDS_Toy_Dataset_Curation/v1_files.csv b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v1_files.csv
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v1_files.csv
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v1_files.csv
diff --git a/CuBIDS_Toy_Dataset_Curation/v1_summary.csv b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v1_summary.csv
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v1_summary.csv
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v1_summary.csv
diff --git a/CuBIDS_Toy_Dataset_Curation/v2_AcqGroupInfo.txt b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v2_AcqGroupInfo.txt
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v2_AcqGroupInfo.txt
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v2_AcqGroupInfo.txt
diff --git a/CuBIDS_Toy_Dataset_Curation/v2_AcqGrouping.csv b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v2_AcqGrouping.csv
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v2_AcqGrouping.csv
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v2_AcqGrouping.csv
diff --git a/CuBIDS_Toy_Dataset_Curation/v2_files.csv b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v2_files.csv
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v2_files.csv
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v2_files.csv
diff --git a/CuBIDS_Toy_Dataset_Curation/v2_full_cmd.sh b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v2_full_cmd.sh
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v2_full_cmd.sh
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v2_full_cmd.sh
diff --git a/CuBIDS_Toy_Dataset_Curation/v2_summary.csv b/cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v2_summary.csv
similarity index 100%
rename from CuBIDS_Toy_Dataset_Curation/v2_summary.csv
rename to cubids/tests/data/CuBIDS_Toy_Dataset_Curation/v2_summary.csv
diff --git a/cubids/tests/test_bond.py b/cubids/tests/test_bond.py
index 5e5b863ca..5a0c3aac1 100644
--- a/cubids/tests/test_bond.py
+++ b/cubids/tests/test_bond.py
@@ -1,5 +1,6 @@
 """Tests for `cubids` package."""
 import json
+import os
 import subprocess
 from copy import deepcopy
 from pathlib import Path
@@ -84,6 +85,8 @@ def test_ok_json_merge_cli(tmp_path):
         / "sub-03_ses-phdiff_acq-HASC55AP_dwi.json"
     )
 
+    assert os.path.isfile(source_json)
+    assert os.path.isfile(dest_json)
     merge_proc = subprocess.run(["bids-sidecar-merge", str(source_json), str(dest_json)])
     assert merge_proc.returncode == 0
     assert not _get_json_string(dest_json) == orig_dest_json_content
@@ -1021,7 +1024,7 @@ def test_validator(tmp_path):
 
     parsed = parse_validator_output(ret.stdout.decode("UTF-8"))
 
-    assert type(parsed) == pd.core.frame.DataFrame
+    assert isinstance(parsed, pd.DataFrame)
 
 
 def test_docker():