Updated exporter function to play nicer with node