Added code to cache matrix inversion!