Added better progress tracking to facilitate stopping and starting of script. Also polished database commits to minimize possibility of data loss.