Modular approach for exporting different format


Hi, I did a little bit re-factoring to allow easy addition of more
formats for export. the export options can now be moved to another place
easily if needed.
Just my two cents. Hope you find it useful.