transpose matrices in definitions rather than during operations for cleaner flow. Fix bug causing multiple dimensions to fail