Throughput-related code refactoring
Summary
Optical throughput code shall be refactored:
- resolve code smells and other issues detected by SonarQube
- increase test coverage
What is the expected correct behavior?
The code should have >=80% test coverage and should not contain any code smells (or at least keep the number of code smells to a bare minimum).