scope reduction
more cppcheck issues addressed