Draft of bulk data export feature
Small code fixes related to bulk data export