Created implemention and factory for KeyService