test cleanup, code changes