Added better exporting for different environments