Initial cppcheck definitions and fixes