First version of cachematrix.R