Export function accepts extra parameters to format dataset
Fixed bugs in "apply" functions
Added export script