Correct issues found by static analysis.

Correct spelling.
Remove redundant assignments.
Initialize variables.
Refactor: Remove redundant assignment