Support for data export.

Closes #12