Fix bug where AutoSave was called after the first entry (the zeroth
entry)
Memory fixes:
 - ensure a proper delete is called by the destructor for every new
   statement in these classes.