More refactoring, csv support & make it possible to query experiments in progress via api

I should use smaller commits.