Improvements from CppCheck