Max script generation: Make the max script generate the structures and structure methods in the same order as they are defined.