implemented identity guide example.
Fixed a couple of issues that were uncovered by it.