Export now getting correct data and converting to CSV. Fixes #20.