Final changes to cachematrix.r