Added Matrix base class. Refactoring of SquareMatrix.
Added exception class.
Implemented unit-tests.