Implemented makeCacheMatrix and cacheSolve func.