Various changes.

* Updating Matrix functionality.
* Matrix unit test.
* Makefile updated.