Made sure to use column-major matrices everywhere. Added unit-tests to verify it.