Now recognizes ids rather than classes. Refactoring.

Brought parse_string_for_csv into export_csv as a closure.