Reworked the export tool. Ready to start tweaking and making more robust