Finished version of programming assignment 2, Caching Matrix