R-apply button click

Remove commented code

Fix variable name