Refactored the exporter plug-in so that separate C files hodl separate plugin responsibilities