entity and test cleanup