Fix `open snippet action`.
Remove unused variable and functions.