Eliminate unused variables

I used jshint with '"unused": true' option.
Merge pull request #2481 from tricknotes/eliminate-unused

Eliminate unused variables