Added check to see if a matrix is square.
Added calculations of the Inverse.

And did some cleaning in the code :)