Now saves current state of database automatically, upon exiting program.