Creating csv export view and lots of minor fixes