Remove unused variable in code snippet