Have just discovered the program cppcheck so am blinding doing as it advises to make the code better.