Fix theories json
Attempt to DRY out json generation consistency hell