Updated with latest simd improvements from original source