Added keys with encryption
Refactoring