Updated the cachematrix.R script with the code needed to work and meaningful comments.