Additional fixes to make restructure work