some cleanup (using cppcheck)