Include changes from 21.3 to sync the code between 21.3 and master
These changes have all been discussed in previous merge requests: !20320 (merged) and !20387 (merged) This request just takes this code.
On top of the changes that were previously in master, this MR also fixes many additional code compliance issues and fixes the header comment to be properly doxygen compliant as suggested in the coding guidelines
Edited by Mark Sutton