Add deprecation comment
Remove duplicate actions, and fix var declaration