tidied up the layout of cachematrix.r