Sonar minor warnings - others

The Minor warnings that have been removed in this pull request are:

* Trailing comment
* Collapsible If statements
* Constant name

Merged changes from master, into current branch changesets.