Keys refactoring #7