more nesting changes & fixes