Introduce VS macro.
Remove unused variable.
Remove redundant assignments.