Not yet complete but 75% there.
- fix warning - remove more bare string ids
Also allow AsRef to be used for Public keys to simplify test code.