Adds bugfix for fast transpose implementation.
Adds Matrix unit test.
Adds faster implementation for weights updating.