Code to export code to csv files - let the graphing begin :)