Code is now in working state; performance is the same as before.
Changed stride of matrix ops to be linear.