Modified base code for makeCacheMatrix and cacheSolve.