Refactor some set but unused vars in the frontend
Merge pull request #2944 from ibuclaw/unusedvars

Refactor some set but unused vars in the frontend