Exporter code refactored