Added matrix inverse and unit tests.