refactoring saves and keys