Added Matrix class and associated unit test.