Updated cachematrix

~updated comments
~updated code