Update doc and remove unused variable