Keys refactoring #6