Added restore/save functionality.