fixing warnings
fixing static analyzer errors
Merge pull request #130 from jcarroll3/warningsAndStaticAnalyzerFixes

Warnings and static analyzer fixes