Added more comments to export.py to explain some of the design
decisions.