Added comments and code to cachematrix.r