scope cleanup