Completed the cachematrix.R functions