Ran some static analysis (cppcheck) tools on the code.