Worked on whole code to reduce g++ compiler warnings with "-Wall" option.
Most of them were comparisson of signed with unsigned int or unused variable.
Some improved variable names.
Remaining few warnings are all unused variables which have a future planned use.
A few lines were commented trather than deleted as I wondered if they might need bringing back for future purposes.