General cleanup using SonarQube and proofreading the code

Feel free to comment on the various fixes.

Each commit should be self sufficient and self explanatory (at least, I hope so).

Note: I grouped them because I'd like to work without waiting each PR to be accepted. And as I will touch a lot of files to clean them up, I'm a bit afraid of merging conflicts.

-- 
Guillaume