Changes for homework. Storing cached value of matrix inverse.