Changed to manage caching of the inverse of a matrix.