Filled in the body of two functions in cachematrix.R