Move variable declarations, remove unneeded assignments, remove comparison duplication
Merge pull request #442 from Dmitry-Me/removeComparisonDuplication

Move variable declarations, remove unneeded assignments, remove comparis...