static code analyzer fixes
more static analys fixes

mostly logging related
comment related cleanup