nesting cleanup