Cleaning up the exporter.

Moving exporter to its own module. Cleaning up the main index.