Add cppcheck to project
Refactor command line app