Enhanced to save/restore the player.