A clean version of the static analysis cleanup.
Merge pull request #34 from Orvid/codeissuescleanup

Static Analysis Cleanup