I have modified the 2 functions to speed up finding inverse matrix through caching

The original files had no contents and had to be created from scratch