refactor type_struct_class