Fixes quite a few errors in the unit tests. Updated test of the csv-exporter