Action: code cleanup (minor)

Fix missing semicolons.
Fix missing var polluting global namespace.
Fix mixed tabs and spaces for indent on same lines.