     var done = zeros((rows-startrow, columns))
     done.flat.grid = array
     if (skip_header==true){
-    return csvFile(data: done, header: y[0].componentsSeparatedByString(","))
+    return CSVFile(data: done, header: y[0].componentsSeparatedByString(","))
     }
     else{
-         return csvFile(data: done, header: [""])
+         return CSVFile(data: done, header: [""])
     }
 }
 

    }
}

func read_csv(filename:String, _ skip_header:Bool=true, _ completeDataRow: Int=1) -> csvFile{
    var x: String?
    do {
        x = try String(contentsOfFile: filename, encoding: NSUTF8StringEncoding)

    {
        startrow = 1
    }
    let test = y[rowWithoutMissingValues + startrow - 1].componentsSeparatedByString(",") //Use first row to detect which columns are categorical
    categorical_col = Array(count:test.count, repeatedValue:-1)
    columns=0
    for testtext in test{
