Committing changes for assignment 2

Adding functionality to calc inverted matrix, using a cache