CE-2952: fix sonarqube code smells
Address code smells from sonarqube.
Before merge:
- Deploy to test/demo and make sure nothing is crashing
- Merge common branch and integrate
This MR is dependent on this one from common: ce-ui-common!154 (merged)
Edited by Max Frederiksen