Initial code to get key manager in settings
Improved key management from settings