Implements changedata-save and changedata-aftersave