Refactoring and unit tests for exporters - Complete