Repair some unit tests; fix cleanup/database inconsistency issue during cleanup rollback