Data is now saved after adding, removing, or clearing data, instead of only at exit.