comment and code cleanup. add try export -r to export_bds