Add in csv export and attachment options from upstream/CSV-export