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 #1486 from lukecampbell/fixes

Multiple fixes