savegame: some refactoring