Include tgmath where appropriate.
Some work on the metadata importer, mainly rename the metadata typedef struct.