Fix shadowing fallout and some other breakage