Save and clear functions.