Converted to intrinsic vectorization

Because you never really know when the compiler means when it says "loop
was vectorized" I rewrote the main loop in vector form.