faster db.cleanup and deep clone