Move getIdentityString to more appropriate place.