Removed all unnecessary matrix transposes

I did this with the intention of reducing run time, but in the end run
time was not altered. However, I believe this at least reduces memory
usage, as the transposed arrays need not be stored anywhere. Since it
does not hurt performance, and I at least think it makes the code a
little nicer, I'm going to commit it anyway. Now to tackle the *real*
bottleneck.