Extract data_struct related code to a separate source files.