Added dirty checking to objects that are defined from yaml.