Add key identity. Add tests.