Added some more casts to double for typed arrays
Initial work on SIMD support