Multiple fixes

- Fixes broken discovery tests
- Fixes the broken QC tests as well as QC in general
- Fixes metadata ingestion for non-numeric types and JSON encodings
Merge pull request #1487 from lukecampbell/fixes-r2

Multiple fixes