Added export to csv
Fixed a bug in how means were calculated after changing the raster backend