Updated makeCacheMatrix and cacheSolve functions