Cleanup format imports.
Add test for document export.