Remove unused variables

Refactor codes, remove unused variables. This patch is the first step.
F841 check in tox.ini will be enabled to make sure that there are no
userd variables in project anymore.

Change-Id: I3edd5bb5e3c203d1d3d92261ed74a201878d6f5a
Partial-Bug: #1268234
Merge "Remove unused variables"