Merge in test cleanup code