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

Not associated with a particular bug.