De-duplicate the parsing of uniqueid type strings and type handling

Depends on #11.