some fixes for bugs in new exporter.js code, work almost done:)