Keys refactoring #5