Converted some DoubleArrays to double[]