Enabled JS' "strict mode" in both JS files.

All var declarations hoisted.

Better indentation.

Removed extra trailing blank lines.

Set yargs parameters by default; no need to pass them now.

More compact expressions.