Removing cli.Main and tests. Refatoring implementations of
IdentityPlugin.