Grand key refactoring