Fixed Matrices

I accidentally wrote all matrices in column major, not row major, so I
fixed them.