Removed auto commiting of a database and added a db.save() function