generified loading/saving and refreshing of data