Fixed logging issue (insert 1 for total on new entry); clean up.