Merge "Fix "brain-overload" functions flagged by SONAR"