Initial work on exporting documents