This de-duplicates the parsing of uniqueid type strings and type handling

Depends on #11.