Created an update_attributes function in the DSC class instead of calling garbage_collect where it was not necessary.