Fixed some warnings

Added parenthesis to some expressions that caused warnings.
Initialized some variables

Initialized some variables that were reported under static analysis.
Eliminated another warning from static analysis

Eliminated another warning from static analysis and changed "for "
structure for while.
Merge pull request #11 from Hecktorzr/master

Warnings