Made changes to R code for Cache Matrix functionality