Code refactoring.
Some improvements to the FileBasedIdentityStore.