Refs #9561; Implemented saving of modified data provenances for sparql objects, cleaned up code