Added the db_purge code and clean up
Added a timestamp for when the status changed happened