Short refactor of Terek's exporter code.