Another bunch of cppcheck recommendations/fixes