tidy scopeClose