misc code tweaks to build_metadata_table
adding metadata_survey, used to see some values of headers and whatnot